0
votes

(Using Hartl's Tutorial) I went through chapter 3 without any problems using rspec to test but after I finished up the section, merged branches, etc - I can no longer run the rspec tests. I'm on chapter 4 trying to do the first set of testing but I get the follow error:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec /core/configuration.rb:746:in load': C:/Sites/rails_projects/sample_app/spec/re quests/static_pages_spec.rb:61: syntax error, unexpected $end, expecting keyword _end (SyntaxError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/configuration.rb:746:inblock in load_spec_files' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/configuration.rb:746:in map' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/configuration.rb:746:inload_spec_files' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/command_line.rb:22:in run' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/runner.rb:69:inrun' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 0.1/lib/rspec/core/runner.rb:10:in `block in autorun'

What could be the problem? I tried running rails generate rspec:install and tried again but with no luck.

1
The trace says it's a syntax error. Post the contents of static_pages_spec, that might help.zetetic

1 Answers

0
votes

first there is a syntax error in the static_pages_spec.rb file...that you need to fix...you should check Hartl's code for the proper syntax...

second, ensure that you are running rspec from the app's root directory...which in probably called sample_app in Hartl's tutorial...

if none of these works, then you should give rpsec and absolute path starting from C:/...

let me know if it works..