spec/grape_entity/entity_spec.rb in grape-entity-0.4.6 vs spec/grape_entity/entity_spec.rb in grape-entity-0.4.7
- old
+ new
@@ -1196,9 +1196,13 @@
friend = double('Friend', name: 'joe', email: 'joe@example.com')
rep = EntitySpec::DelegatingEntity.new(friend)
expect(rep.send(:value_for, :name)).to eq 'cooler name'
expect(rep.send(:value_for, :email)).to eq 'joe@example.com'
+
+ another_friend = double('Friend', email: 'joe@example.com')
+ rep = EntitySpec::DelegatingEntity.new(another_friend)
+ expect(rep.send(:value_for, :name)).to eq 'cooler name'
end
context 'using' do
before do
module EntitySpec