Matt McNeil
2009-May-01 20:10 UTC
[rspec-users] Rspec-rails without ActiveRecord framework failure
Hello, Our project is not using ActiveRecord and so I''ve removed database.yml and added this line to the environment.rb file: config.frameworks -= [ :active_record ] Although I see in the rspec-rails source several places where the existence of ActiveRecord::Base is checked, I am still getting the following exception when running my specs: uninitialized constant Spec::Matchers::Change::ActiveRecord When I comment out the code in rspec-rails-1.2.6/lib/spec/rails/matchers/change.rb, this error disappears. Is this expected behavior? If not, is there a workaround I could use until the issue is resolved? I tried undoing the method chain defined in that file (by a monkeypatch in spec_helper.rb) but it unsurprisingly fails because I''m guessing the method is aliased later in the code execution sequence. Thanks for any input, Matt -- View this message in context: http://www.nabble.com/Rspec-rails-without-ActiveRecord-framework-failure-tp23338988p23338988.html Sent from the rspec-users mailing list archive at Nabble.com.
David Chelimsky
2009-May-01 20:36 UTC
[rspec-users] Rspec-rails without ActiveRecord framework failure
On Fri, May 1, 2009 at 3:10 PM, Matt McNeil <nabble at mattmcneil.org> wrote:> > Hello, > > Our project is not using ActiveRecord and so I''ve removed database.yml and > added this line to the environment.rb file: > ?config.frameworks -= [ :active_record ] > > Although I see in the rspec-rails source several places where the existence > of ActiveRecord::Base is checked, I am still getting the following exception > when running my specs: > > uninitialized constant Spec::Matchers::Change::ActiveRecord > > When I comment out the code in > rspec-rails-1.2.6/lib/spec/rails/matchers/change.rb, this error disappears. > > Is this expected behavior? ?If not, is there a workaround I could use until > the issue is resolved? ?I tried undoing the method chain defined in that > file (by a monkeypatch in spec_helper.rb) but it unsurprisingly fails > because I''m guessing the method is aliased later in the code execution > sequence.Can you please file a bug report at http://rspec.lighthouseapp.com? I need to fix something else and do another rspec-rails release over the weekend (before RC) and I''ll fix this one in the same release. Don''t know about a workaround this minute, but when i look at the ticket later I''ll put one in there. Cheers, David> > Thanks for any input, > Matt > > > -- > View this message in context: http://www.nabble.com/Rspec-rails-without-ActiveRecord-framework-failure-tp23338988p23338988.html > Sent from the rspec-users mailing list archive at Nabble.com. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Matt McNeil
2009-May-01 21:23 UTC
[rspec-users] Rspec-rails without ActiveRecord framework failure
David Chelimsky-2 wrote:> > > Can you please file a bug report at http://rspec.lighthouseapp.com? I > need to fix something else and do another rspec-rails release over the > weekend (before RC) and I''ll fix this one in the same release. Don''t > know about a workaround this minute, but when i look at the ticket > later I''ll put one in there. > > Cheers, > David > >Thanks for the quick response! I''ve filed a Lighthouse ticket here: http://tr.im/kfbA cheers, Matt -- View this message in context: http://www.nabble.com/Rspec-rails-without-ActiveRecord-framework-failure-tp23338988p23339920.html Sent from the rspec-users mailing list archive at Nabble.com.