Skip to content

Instantly share code, notes, and snippets.

@diogob
Created September 11, 2013 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogob/6527029 to your computer and use it in GitHub Desktop.
Save diogob/6527029 to your computer and use it in GitHub Desktop.
describe ".channel_subscribers_report" do
let(:url){ "/users/:id" }
before do
User.should_receive(:select).with("users.name, users.email, replace('#{url}', ':id', users.id::text) AS url").and_call_original
end
it("should call select with name, email and user url") do
User.channel_subscribers_report("/users/:id")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment