Sha256: f8a8e8410a2e79a67a9e4b894752e79a90646767d3acb2103508b7895a1fe8bd
Contents?: true
Size: 447 Bytes
Versions: 1
Compression:
Stored size: 447 Bytes
Contents
Given /^I have no basic auth credentials$/ do basic_auth(nil, nil) end Then /^I should not be able to access (.+)$/ do |page_name| assert_raise(Mechanize::ResponseCodeError) do if respond_to? :visit visit path_to(page_name) else get path_to(page_name) end end end Given /^I have basic auth credentials "([^\"]*)"$/ do |credentials| username, password = credentials.split(':') basic_auth(username, password) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mechanical-cuke-0.5.0 | features/step_definitions/basic_auth_steps.rb |