Class: BeTrueMatcher

Inherits:
Object show all
Defined in:
lib/extensions/rhospec/rhospec.rb,
lib/extensions/mspec/mspec/matchers/be_true.rb

Instance Method Summary collapse

Instance Method Details

#failure_messageObject



358
359
360
# File 'lib/extensions/rhospec/rhospec.rb', line 358

def failure_message
  ["Expected #{@actual.inspect}", "to be true"]
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


353
354
355
356
# File 'lib/extensions/rhospec/rhospec.rb', line 353

def matches?(actual)
  @actual = actual
  @actual == true
end

#negative_failure_messageObject



362
363
364
# File 'lib/extensions/rhospec/rhospec.rb', line 362

def negative_failure_message
  ["Expected #{@actual.inspect}", "not to be true"]
end