I'm doing TestFirst.org's Learn Ruby tutorial and am currently on exercise number 3 Simon Says. I'm not sure if this is a problem or if it's interfering with my tests (and giving me the wrong results) using rspec, but the terminal prints out some error messages before it shows that all my tests have passed.
caitlyns-mbp:03_simon_says caitlynyu$ rake
(in /Users/caitlynyu/Desktop/learn_ruby)
/Users/caitlynyu/Desktop/learn_ruby/03_simon_says/simon_says_spec.rb:62: warning: possibly useless use of == in void context
/Users/caitlynyu/Desktop/learn_ruby/03_simon_says/simon_says_spec.rb:63: warning: possibly useless use of == in void context
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Simon says
repeat
should repeat
should repeat a number of times
echo
should echo hello
should echo bye
start_of_word
returns the first letter
returns the first several letters
returns the first two letters
shout
should shout hello
should shout multiple words
first_word
tells us the first word of 'Hello World' is 'Hello'
tells us the first word of 'oh dear' is 'oh'
titleize
doesn't capitalize 'little words' in a title
does capitalize 'little words' at the start of a title
capitalizes every word (aka title case)
capitalizes a word
Finished in 0.00324 seconds
15 examples, 0 failures
Randomized with seed 36160
It gives a warning for the simon_says_spec.rb but this is the spec provided by the TestFirst Learn Ruby tutorial. Why is there a problem with this? Also, is it a big issue that it says 'All examples were filtered out; ignoring {:focus=>true|}'?
The errors are likely due to you using RSpec 3 while the tests were written for RSpec 2, but you should be able to safely ignore them. The ignoring message is supposed to be there, as explained in the RSpec documentation.