Created
October 8, 2012 18:13
-
-
Save fltiago/3853998 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
describe Grape::API do | |
subject { Wally.new } | |
def app; subject end | |
... | |
context "GET wall by resource_id" do | |
context "when exist a wall" do | |
before do | |
subject.helpers do | |
def permit | |
permit = double("Permit::Mechanism") | |
permit.stub(:able_to?).and_return(false) | |
permit | |
end | |
end | |
get "/walls/#{@wall.resource_id}", {token: @author.token} | |
end | |
... |
this can't be the way to do this. This is Ruby for fuck sake, rewriting methods for tests is SO Java.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this can't be the way to do this. This is Ruby for fuck sake, rewriting methods for tests is SO Java.