As of version 3.0, RSpec renamed be_true
to be_truthy
and be_false
to be_falsey
as documented in https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/be-matchers and discussed in https://github.com/rspec/rspec-expectations/issues/283.
be_true
and be_false
were deprecated in 2.99 and dropped in 3.00 because they didn't just match true
and false
, respectively and were therefore misleading. The error message you're getting is because absent any specific be_xxxx
method definition, be_xxxx
will look for and invoke xxxx?
on the actual.
Note that if you want to match just true
, you can use be true
(or be(true)
).