I have inherited a rails 2.3.14 application with no tests. I have gotten cucumber working but when I try to user rspec will not run any of the test cases. These are the first four lines in myspec/spec_helper.rb. ENV["RAILS_ENV"] ||= ''test'' require File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment'')) require ''spec/autorun'' require ''spec/rails'' When I run bundle exec rake spec it does not have any test cases. But, when I remove require ''spec/rails'' it runs correctly and the test cases are executed. I have looked at all the code and even started digging into the rspec-rails gem (rspec-rails 1.3.4 and rspec 1.3.2) but have not found anything. Any ideas of what might be going wrong when rspec-rails is used? Josh Moore resumecompanion.com josh at resumecompanion.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120323/81d41f67/attachment.html>
On Fri, Mar 23, 2012 at 3:34 AM, Josh Moore <josh at resumecompanion.com> wrote:> I??have inherited a rails 2.3.14 application with no tests. I have gotten > cucumber working but when I try to user rspec will not run any of the test > cases. These are the first four lines in myspec/spec_helper.rb. > > ENV["RAILS_ENV"] ||= ''test'' > require > File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment'')) > require ''spec/autorun'' > require ''spec/rails'' > > When I run?bundle exec rake spec?it does not have any test cases. But, when > I remove?require ''spec/rails''?it runs correctly and the test cases are > executed. I have looked at all the code and even started digging into the > rspec-rails gem (rspec-rails 1.3.4 and rspec 1.3.2) but have not found > anything. Any ideas of what might be going wrong when rspec-rails is used?What''s in the Gemfile?