Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Ch.9, be_named matcher should use "==" #116

Open
JunichiIto opened this issue Aug 25, 2014 · 0 comments
Open

Ch.9, be_named matcher should use "==" #116

JunichiIto opened this issue Aug 25, 2014 · 0 comments

Comments

@JunichiIto
Copy link

In be_named matcher, eq is used but it fails with message "ArgumentError: wrong number of arguments (1 for 0)". According to the RSpec document, it should be "==".

RSpec::Matchers.define :be_named do |expected|
  match do |actual|
    # not work
    # actual.name eq expected 

    # should be
    actual.name == expected
  end
  description do
    "return a full name as a string"
  end
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant