Rspec-rails without ActiveRecord framework failure


#1

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.


#2

On Fri, May 1, 2009 at 3:10 PM, Matt McNeil removed_email_address@domain.invalid
wrote:

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


#3

David C.-2 wrote:

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.