spec/integration/virtus/value_object_spec.rb in virtus-0.2.0 vs spec/integration/virtus/value_object_spec.rb in virtus-0.3.0
- old
+ new
@@ -27,11 +27,11 @@
end
end
describe 'writer visibility' do
it 'attributes are configured for private writers' do
- class_under_test.attributes[:latitude].writer_visibility.should == :private
- class_under_test.attributes[:longitude].writer_visibility.should == :private
+ class_under_test.attributes[:latitude].public_reader?.should be(true)
+ class_under_test.attributes[:longitude].public_writer?.should be(false)
end
it 'writer methods are set to private' do
private_methods = class_under_test.private_instance_methods
private_methods.map! { |m| m.to_s }