Skip to content

Instantly share code, notes, and snippets.

@technoweenie
Created June 7, 2010 15:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save technoweenie/428825 to your computer and use it in GitHub Desktop.
Save technoweenie/428825 to your computer and use it in GitHub Desktop.
require 'test_helper'
class UsersTest < ActionController::IntegrationTest
setup do
reset!
@conn = Faraday::Connection.new do |b|
b.adapter :action_dispatch, @integration_session
b.response :rails_json
end
end
test "the truth" do
resp = @conn.get '/users.json'
user = resp.body[0]
assert_equal 1, resp.body.size
assert_equal "aric.smith@kautzergoyette.name", user['email']
end
end
@technoweenie
Copy link
Author

Also, this seems to work in Rails 2.2, and I'm assuming 2.3.

@zenhob
Copy link

zenhob commented Jun 7, 2010

HAWT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment