Forum: RSpec File not found

Posted by One Two (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
file?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.