Sha256: 8f34ada96730a8a1059bed179d6df735f5b72b51883368ed0a6824243b606643

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

module APIMatchers
  module HTTPStatusCode
    class BeUnauthorized < Base
      def expected_status_code
        401
      end

      def failure_message
        %Q{expected that '#{@http_status_code}' to be Unauthorized with the status '401'.}
      end

      def failure_message_when_negated
        %Q{expected that '#{@http_status_code}' to NOT be Unauthorized.}
      end

      def description
        "be Unauthorized with the status '401'"
      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_unauthorized.rb
api_matchers-0.6.1 lib/api_matchers/http_status_code/be_unauthorized.rb