Skip to content

Instantly share code, notes, and snippets.

@mxswd
Created September 2, 2012 12:11
Show Gist options
  • Select an option

  • Save mxswd/3597855 to your computer and use it in GitHub Desktop.

Select an option

Save mxswd/3597855 to your computer and use it in GitHub Desktop.
# run `rspec api_spec.rb`
RSpec.configure do |config|
config.color_enabled = true
end
require 'faraday'
require 'json'
describe :api do
it 'should get /' do
r = JSON::load Faraday.get('https://api.github.com/users/maxpow4h').body
r["login"].should == "maxpow4h"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment