Sha256: c776cf941d49e455f8a23ca816266861e91414a2cb686a9b32b5e1d1f3846ef3
Contents?: true
Size: 706 Bytes
Versions: 2
Compression:
Stored size: 706 Bytes
Contents
class BeAuthorized def matches?(response) @response = response @response.status == "200 OK" && @response.body == 'Allowed Access' end # ==== Returns # String:: The failure message. def failure_message <<-EOS expected the response from #{@response.request.url} to have the status 200 OK and body 'Allowed Access'" but the status is #{@response.status} and the body is '#{@response.body}'" EOS end # ==== Returns # String:: The failure message to be displayed in negative matches. def negative_failure_message <<-EOS expected the response from #{@response.request.url} not to have the status 200 Ok and body 'Allowed Access'" EOS end end def be_authorized BeAuthorized.new end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
jrun-rails_doorman-0.0.1 | features/support/authorized_matcher.rb |
rails-doorman-0.1.0 | features/support/authorized_matcher.rb |