Skip to content

Instantly share code, notes, and snippets.

@juriglx
Created November 23, 2009 17:54
Show Gist options
  • Save juriglx/241230 to your computer and use it in GitHub Desktop.
Save juriglx/241230 to your computer and use it in GitHub Desktop.
#Cucumber steps for restful post
require 'webrat'
When /^I post (.*) to (.+)$/ do |data, path|
@response = request_page(path, :post, JSON.parse(data))
end
Then /^I should get a "(.*)" response$/ do |response_code|
@response.code.should == response_code
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment