Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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
Add Comment
Please, Sign In to add comment