Created
December 19, 2012 20:00
-
-
Save fearoffish/4339963 to your computer and use it in GitHub Desktop.
rubymotion spec
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
describe "#get" do | |
it "adds an auth token to the params when given" do | |
stub_request(:get, "http://fcp.dev/api/?auth_token=token"). | |
to_return(body: "{\"Hello\":\"World\"}", content_type: "application/json") | |
@body = nil | |
@server.auth_token = 'token' | |
@server.get('http://fcp.dev/api/') do |body| | |
@body = body | |
resume | |
end | |
wait_max 1.0 do | |
@body.should.be == {"Hello" => "World"} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment