Sha256: 77ef09c15c4fc262ca1caa8722e448944c680c4bc6215695bcea15e938a1df10

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

describe "Matcher::Eql" do
  it 'eql passes when value is == to subject' do
    obj = Object.new
    expect(obj).to eql(obj)
  end

  it "eql fails when value is not == subject" do
    expect_failure{ expect(Object.new).to eql(Object.new) }
  end

  it "eql fails when value is nil and subject an Object" do
    expect_failure{ expect(Object.new).to eql(nil) }
  end

  it "be is an alias of eql" do
    obj = Object.new
    expect(obj).to be(obj)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bacon-expect-1.0.1 spec_app/spec/matchers/eql_spec.rb
bacon-expect-0.1 spec_app/spec/matchers/eql_spec.rb