Sha256: 6506a9fba250cbe908ba56c9f536c0852d9e0a01e9090dd1d7a2daa2b850314b

Contents?: true

Size: 515 Bytes

Versions: 13

Compression:

Stored size: 515 Bytes

Contents

require 'spec_helper'
include NSConnector

describe SubListItem do
	context 'new' do
		before :each do
			parent = double(
				'contact', :type_id => 'contact', :id => '42'
			)
			@s = SubListItem.new('sublist', ['field1', 'field2'], parent)
		end

		it 'has things we expect' do
			expect(@s.field1).to eql(nil)
			@s.field1 = 'yay'
			expect(@s.field1).to eql('yay')
			expect(@s.field2).to eql(nil)
		end

		it 'has a .store' do
			@s.field1 = 'yay'
			expect(@s.store).to eql('field1' => 'yay')
		end
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ns_connector-0.1.0 spec/sublist_item_spec.rb
ns_connector-0.0.17 spec/sublist_item_spec.rb
ns_connector-0.0.16 spec/sublist_item_spec.rb
ns_connector-0.0.15 spec/sublist_item_spec.rb
ns_connector-0.0.14 spec/sublist_item_spec.rb
ns_connector-0.0.13 spec/sublist_item_spec.rb
ns_connector-0.0.12 spec/sublist_item_spec.rb
ns_connector-0.0.11 spec/sublist_item_spec.rb
ns_connector-0.0.10 spec/sublist_item_spec.rb
ns_connector-0.0.9 spec/sublist_item_spec.rb
ns_connector-0.0.8 spec/sublist_item_spec.rb
ns_connector-0.0.7 spec/sublist_item_spec.rb
ns_connector-0.0.6 spec/sublist_item_spec.rb