otwarchive-symphonyarchive/features/step_definitions/request_header_steps.rb
2026-03-11 22:22:11 +00:00

14 lines
376 B
Ruby

World(Rack::Test::Methods)
# thanks to these guys: http://www.anthonyeden.com/2010/11/testing-rest-apis-with-cucumber-and-rack-test/
Given /^I use a PSP browser$/ do
header 'Accept', '*/*;q=0.01'
end
Given /^I make a request for "([^\"]*)"$/ do |path|
get path
end
Then /^the response should be "([^\"]*)"$/ do |status|
last_response.status.should == status.to_i
end