Permalink
Browse files

Set Object as the default primitive when building accessor

  • Loading branch information...
1 parent c53de11 commit 97a161f19d20a961094112464075c284d68d35e4 @solnic committed Mar 10, 2013
@@ -13,7 +13,7 @@ def initialize(name, type, options = {})
@name = name
@type = type
@options = options
- @primitive = options[:primitive]
+ @primitive = options.fetch(:primitive, ::Object)
@visibility = determine_visibility
end
@@ -6,7 +6,7 @@
let(:object) { described_class.new('test', type, options) }
let(:type) { mock('attribute_type') }
let(:writer_class) { mock('writer_class') }
- let(:primitive) { options[:primitive] }
+ let(:primitive) { Object }
context "when options provides writer_class" do
let(:options) { { :writer_class => writer_class } }
@@ -6,7 +6,7 @@
let(:object) { described_class.new('test', type, options) }
let(:type) { mock('attribute_type') }
let(:reader_class) { mock('reader_class') }
- let(:primitive) { options[:primitive] }
+ let(:primitive) { Object }
context "when options provides reader_class" do
let(:options) { { :reader_class => reader_class } }

0 comments on commit 97a161f

Please sign in to comment.