Forum: RSpec Rspec-rails without ActiveRecord framework failure

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matt McNeil (Guest)
on 2009-05-02 00:17
(Received via mailing list)
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-ActiveRe...
Sent from the rspec-users mailing list archive at Nabble.com.
David C. (Guest)
on 2009-05-02 00:54
(Received via mailing list)
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
Matt McNeil (Guest)
on 2009-05-02 01:30
(Received via mailing list)
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-ActiveRe...
Sent from the rspec-users mailing list archive at Nabble.com.
This topic is locked and can not be replied to.