Forum: RSpec File not found

C09235958e4d9dee914f7fffa5df8386?d=identicon&s=25 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?
This topic is locked and can not be replied to.