forked from ruby-grape/grape-entity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: entity instance methods exposure.
This one fixes a regression introduced in ruby-grape#147: entity instance methods were exposed with `NoMethodError`. Fixes ruby-grape#163. Additional specs are added.
- Loading branch information
1 parent
8af8074
commit 52be44a
Showing
4 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module GrapeEntity | ||
VERSION = '0.4.6' | ||
VERSION = '0.4.7' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1198,6 +1198,10 @@ def name | |
rep = EntitySpec::DelegatingEntity.new(friend) | ||
expect(rep.send(:value_for, :name)).to eq 'cooler name' | ||
expect(rep.send(:value_for, :email)).to eq '[email protected]' | ||
|
||
another_friend = double('Friend', email: '[email protected]') | ||
rep = EntitySpec::DelegatingEntity.new(another_friend) | ||
expect(rep.send(:value_for, :name)).to eq 'cooler name' | ||
end | ||
|
||
context 'using' do | ||
|