1
I’m starting to study about ruby/rspec by following a book, but I’m not making progress using the matcher be_true
.
Follow below the error:
BagOfWords#push is possible to put words on it (FAILED - 1)
Failures:
1) BagOfWords#push is possible to put words on it
Failure/Error: expect(isTrue).to be_true
expected true to respond to `true?`
# ./spec/bag_of_words_spec.rb:12:in `block (3 levels) in <top (require d)>'
Finished in 0.015 seconds (files took 0.54403 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/bag_of_words_spec.rb:7 # BagOfWords#push is possible to put words on it
Which version of Rspec are you using? You can try using
be_truthy
if it is Rspec 3.– squiter
Sorry for the delay in answering... That’s right, I’m using Rspec 3, I just switched and it worked worth.
– cido18
@18, can you include the answer to the problem and accept it? This avoids questions that are already answered in the comments being listed as "No answer".
– Bruno Coimbra