Sha256: 2c0614f30e28b42e893a1bca625ffd53b373f36cde6298a97d8d2baa002f8fc9

Contents?: true

Size: 536 Bytes

Versions: 5

Compression:

Stored size: 536 Bytes

Contents

RSpec::Matchers.define :respond_with_status do |expected|
  match do |actual|
    actual.browser.last_response.status == expected
  end
  description do
    "respond with status code equal to #{expected}"
  end
  failure_message do |actual|
    "expected #{actual} response would be equal \nto  : #{expected} \ngot : #{actual.browser.last_response.status}"
  end
  failure_message_when_negated do |actual|
    "expected #{actual} response would not be equal \nto  : #{expected} \ngot : #{actual.browser.last_response.status}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rack-rest-rspec-0.0.4 lib/rack-rest-rspec/matchers/respond_with_status.rb
rack-rest-rspec-0.0.3 lib/rack-rest-rspec/matchers/respond_with_status.rb
rack-rest-rspec-0.0.2 lib/rack-rest-rspec/matchers/respond_with_status.rb
rack-rest-rspec-0.0.1 lib/rack-rest-rspec/matchers/respond_with_status.rb
rack-rest-rspec-0.0.1a lib/rack-rest-rspec/matchers/respond_with_status.rb