Closed wheresalice closed 7 years ago
I'm using these tests all the time with good success :) Care to put up a PR that reproduces this?
It turns out this was entirely my fault by naming the command specfile spec/slack-mathbot/commands/calculate.rb
- ie missing out _spec
in the filename and therefore it wasn't even loading it. My one passing test was in bot_spec.rb
.
Glad it was something simple and that we were able to help!
I have followed the tutorial and the tests aren't actually testing anything it seems.
My command looks like this:
Note it's returning 3.
My tests look like this:
Note it's expecting 2+2 to equal 5.
This test passes. 2+2 does not equal 3 or 5, so it should fail.
I'm running the tests with
bundle exec rspec
The tests in dblock/slack-mathbot which this tutorial is apparently based on correctly fail if I try to expect 2+2 to equal 5.