Skip to content

Instantly share code, notes, and snippets.

@bds
Last active September 12, 2015 17:42
Show Gist options
  • Save bds/9670328 to your computer and use it in GitHub Desktop.
Save bds/9670328 to your computer and use it in GitHub Desktop.
Test Rails endpoints from console with Rack::Test
require 'rack/test'
browser = Rack::Test::Session.new(Rack::MockSession.new(Fooproject::Application))
browser.get("/posts.json")
browser.post("/posts.json", {:id => 1})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment