Sha256: 86c73a172885f03f843f8f691c0a37c4c5a182dfa219eee5655bbcc1a6d883dd

Contents?: true

Size: 750 Bytes

Versions: 2

Compression:

Stored size: 750 Bytes

Contents

module APIMatchers
  module HTTPStatusCode
    class BeUnprocessableEntity < Base
      def expected_status_code
        422
      end

      def failure_message
        %Q{expected that '#{@http_status_code}' to be Unprocessable entity with the status '#{expected_status_code}'.}
      end

      def failure_message_when_negated
        %Q{expected that '#{@http_status_code}' to NOT be Unprocessable entity with the status '#{expected_status_code}'.}
      end

      def description
        "be Unprocessable entity with the status '422'"
      end

      # RSpec 2 compatibility:
      alias_method :failure_message_for_should, :failure_message
      alias_method :failure_message_for_should_not, :failure_message_when_negated
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_matchers-0.6.2 lib/api_matchers/http_status_code/be_unprocessable_entity.rb
api_matchers-0.6.1 lib/api_matchers/http_status_code/be_unprocessable_entity.rb