Sha256: c1cd80606b50718ec3ecc0ec36b6d695b959be487dbe86fdcbd900c66337b37a
Contents?: true
Size: 952 Bytes
Versions: 11
Compression:
Stored size: 952 Bytes
Contents
require 'spec_helper' describe Net::NTLM::Field do it_behaves_like 'a field', 'Foo', false context 'with no size specified' do let (:field_without_size) { Net::NTLM::Field.new({ :value => 'Foo', :active => true }) } it 'should set size to 0 if not active' do expect(field_without_size.size).to eq(0) end it 'should return 0 if active but no size specified' do field_without_size.active = true expect(field_without_size.size).to eq(0) end end context 'with a size specified' do let (:field_with_size) { Net::NTLM::Field.new({ :value => 'Foo', :active => true, :size => 100 }) } it 'should return the size provided in the initialize options if active' do expect(field_with_size.size).to eq(100) end it 'should still return 0 if not active' do field_with_size.active = false expect(field_with_size.size).to eq(0) end end end
Version data entries
11 entries across 11 versions & 3 rubygems