Sha256: 15a0960f36da538bb36b0bb8367aff1ea4008d66e218e9ac12fd797c89169f7a

Contents?: true

Size: 601 Bytes

Versions: 23

Compression:

Stored size: 601 Bytes

Contents

# Use this to test that an HTTP response is properly "410/Gone"
#
# The object you expect on is generally `self`, because this is the object on which
# rspec_api_documentation allows you to call `status`
#
# get "/api/widgets" do
#   it "has been removed" do
#     expect(self).to be_gone
#   end
# end
RSpec::Matchers.define :be_gone do
  match do |rspec_api_documentation_context|
    rspec_api_documentation_context.status == 410
  end
  failure_message do |rspec_api_documentation_context|
    "Expected HTTP status to be 410/Gone, but it was #{rspec_api_documentation_context.status}"
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
stitches-5.0.0 lib/stitches/spec/be_gone.rb
stitches-5.0.0.RC1 lib/stitches/spec/be_gone.rb
stitches-4.2.2 lib/stitches/spec/be_gone.rb
stitches-4.2.1 lib/stitches/spec/be_gone.rb
stitches-4.2.0 lib/stitches/spec/be_gone.rb
stitches-4.2.0.RC3 lib/stitches/spec/be_gone.rb
stitches-4.2.0.RC2 lib/stitches/spec/be_gone.rb
stitches-4.2.0.RC1 lib/stitches/spec/be_gone.rb
stitches-4.0.2 lib/stitches/spec/be_gone.rb
stitches-4.1.0RC2 lib/stitches/spec/be_gone.rb
stitches-4.0.1 lib/stitches/spec/be_gone.rb
stitches-4.0.0 lib/stitches/spec/be_gone.rb
stitches-4.0.0.RC1 lib/stitches/spec/be_gone.rb
stitches-3.8.3 lib/stitches/spec/be_gone.rb
stitches-3.8.2 lib/stitches/spec/be_gone.rb
stitches-3.8.1 lib/stitches/spec/be_gone.rb
stitches-3.8.0 lib/stitches/spec/be_gone.rb
stitches-3.7.3 lib/stitches/spec/be_gone.rb
stitches-3.7.2 lib/stitches/spec/be_gone.rb
stitches-3.7.0 lib/stitches/spec/be_gone.rb