Guest User

Untitled

a guest
Apr 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #Cucumber steps for restful post
  2. require 'webrat'
  3.  
  4. When /^I post (.*) to (.+)$/ do |data, path|
  5. @response = request_page(path, :post, JSON.parse(data))
  6. end
  7.  
  8. Then /^I should get a "(.*)" response$/ do |response_code|
  9. @response.code.should == response_code
  10. end
Add Comment
Please, Sign In to add comment