Sha256: 72eaa9f243927cf92b2558f18205a4432f8e67d1ae6e1f29c466f6c73c13a61e

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

module Outpost
  module Expectations
    # Module containing response_code logic. It is the simplest of all,
    # it is a simple direct equality check. Extend your Scout to win instant
    # response_code checking.
    module ResponseCode
      # Installs the response code expectation
      def self.extended(base)
        base.expect :response_code, base.method(:evaluate_response_code)
      end

      # Method that will be used as an expectation to evaluate response code
      def evaluate_response_code(scout, response_code)
        scout.response_code == response_code.to_i
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
outpost-0.2.0 lib/outpost/expectations/response_code.rb