Class: Spec::Client::Http::Matcher::TransactionMatchers::BeRedirect

Inherits:
VerboseHttpMatcher show all
Defined in:
lib/spec/client/http/matcher/transaction_matchers.rb

Instance Attribute Summary

Attributes inherited from VerboseHttpMatcher

#transaction

Instance Method Summary collapse

Methods inherited from VerboseHttpMatcher

#transaction_info

Instance Method Details

#failure_messageObject



38
39
40
# File 'lib/spec/client/http/matcher/transaction_matchers.rb', line 38

def failure_message
  "expected redirect? to return true, got false" + "\n" + super
end

#matches?(transaction) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
36
# File 'lib/spec/client/http/matcher/transaction_matchers.rb', line 33

def matches?(transaction)
  super(transaction) && transaction.redirect?
  #(300..399).include? transaction.response.code
end

#negative_failure_messageObject



42
43
44
# File 'lib/spec/client/http/matcher/transaction_matchers.rb', line 42

def negative_failure_message
  "expected redirect? to return false, got true" + "\n" + super
end