私は TestFirst.org の Learn Ruby チュートリアルを行っており、現在演習番号 3 の Simon Says に取り組んでいます。これが問題なのか、それとも rspec を使用したテストに干渉している (そして間違った結果が得られている) のかはわかりませんが、すべてのテストに合格したことを示す前に、ターミナルにいくつかのエラー メッセージが表示されます。
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
simon_says_spec.rb に対して警告が表示されますが、これは TestFirst Learn Ruby チュートリアルで提供されている仕様です。なぜこれに問題があるのですか?また、「すべての例が除外されました。{:focus=>true|}' を無視しますか?