Created
August 16, 2013 22:51
-
-
Save Neener54/6254190 to your computer and use it in GitHub Desktop.
Best Stubbing Ever
This file contains hidden or 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
item.stub(:[]).and_return('1') | |
item.stub(:[]).with(:name).and_return('Foo Inc') | |
item.stub(:[]).with(:thing_id).and_return(%w(1)) | |
item.stub(:[]).with(:error_description).and_return(['Successful']) | |
item.stub(:to_json).and_return('json data') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment