Forum: RSpec File not found

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5c4a5bef4d05ead207d84011823aa1d8?d=identicon&s=25 One T. (one)
on 2012-06-21 19:12
I've been trying to learn RSpec using the book The RSpec Book by David
Chelimsky but I've been having a problem in Chapter 5 around page 50. I
tried running "rspec spec/codebreaker/game_spec.rb --format doc" but it
said that codebreaker could not be found.

The file spec/codebreaker/game_spec.rb requires spec/spec_helper and
spec_helper requires spec/codebreaker. In fact, the whole contents of
spec/spec_helper.rb is "require 'codebreaker'". However,
spec/codebreaker is a directory not a file and I wonder if this is
causing the problem. It seems to me that "require 'codebreaker'" would
look for spec/codebreaker.rb, but I can't find anywhere where the book
says to define a file called spec/codebreaker.rb.

Does anyone know what the problem might be? Can "require 'codebreaker'"
make sense if codebreaker is a directory but there is no codebreaker.rb
This topic is locked and can not be replied to.