Skip to content

Commit

Permalink
To make the spec support smarter
Browse files Browse the repository at this point in the history
You do not have to specify forwarded attributes in the model double
  • Loading branch information
ywen committed Jul 27, 2012
1 parent c668ec4 commit 5bfabec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/support/macros/forward_from_model.rb
Expand Up @@ -5,6 +5,7 @@ def forward_from_model_attributes(*attributes)
attributes.each do |attribute|
describe "##{attribute}" do
it "returns the model.#{attribute}" do
model.stub(attribute).and_return(attribute)
result = subject.send(attribute)
if result.respond_to?(:should)
result.should eq(model.send(attribute))
Expand Down

0 comments on commit 5bfabec

Please sign in to comment.