File: field_shared.rb

package info (click to toggle)
ruby-ntlm 0.6.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 408 kB
  • sloc: ruby: 2,663; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
shared_examples_for 'a field' do  | value, active|

  subject do
    described_class.new({
        :value  => value,
        :active => active
    })
  end

  it { should respond_to :active }
  it { should respond_to :value }
  it { should respond_to :size }
  it { should respond_to :parse }
  it { should respond_to :serialize }


  it 'should set the value from initialize options' do
    expect(subject.value).to eq(value)
  end

  it 'should set active from initialize options' do
    expect(subject.active).to eq(active)
  end

end