Skip to content

Instantly share code, notes, and snippets.

@caged caged/gist:48499
Created Jan 18, 2009

Embed
What would you like to do?
describe "Users Controller", "find_recent action" do
it "should find all users who've been active in the last 24 hours" do
@users = mock("A list of users")
User.should_receive(:find_all).with(24).and_return(@users)
c, r = request("/users/find_recent/24")
c.body.should eql(@users.to_json) # Where is the to_json method coming from? Will it actually contain any data?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.