-
-
Save kaiwren/562205 to your computer and use it in GitHub Desktop.
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
class Resource | |
end | |
class Record | |
end | |
@resource = mock(Resource, :id => '1') | |
Resource.stub!(:find).and_return([@resource]) # works | |
Record.stub!(:serialize).and_return(true) | |
@record = mock(Record, :id => '1', :resource_ids => [1], :current_language => 'de') # fails later with: | |
# undefined method `serialize' for Spec::Mocks::Mock:Class |
Author
kaiwren
commented
Sep 2, 2010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment