Sha256: e2f7525dbcee5bb14d9b389a59b322fbf236e31507edb2e1a377fa3ab58e60f5

Contents?: true

Size: 316 Bytes

Versions: 6

Compression:

Stored size: 316 Bytes

Contents

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

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

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

class Object
  def be_nil
    BeNilMatcher.new
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rhodes-7.6.0 lib/extensions/mspec/mspec/matchers/be_nil.rb
rhodes-7.5.1 lib/extensions/mspec/mspec/matchers/be_nil.rb
rhodes-7.4.1 lib/extensions/mspec/mspec/matchers/be_nil.rb
rhodes-7.1.17 lib/extensions/mspec/mspec/matchers/be_nil.rb
rhodes-6.2.0 lib/extensions/mspec/mspec/matchers/be_nil.rb
rhodes-6.0.11 lib/extensions/mspec/mspec/matchers/be_nil.rb