Class: BeNilMatcher

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

Instance Method Summary collapse

Instance Method Details

#failure_messageObject



282
283
284
# File 'lib/extensions/rhospec/rhospec.rb', line 282

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

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


277
278
279
280
# File 'lib/extensions/rhospec/rhospec.rb', line 277

def matches?(actual)
  @actual = actual
  @actual.nil?
end

#negative_failure_messageObject



286
287
288
# File 'lib/extensions/rhospec/rhospec.rb', line 286

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