# In a rails3 - rspec then require 'authlogic/test\_case' and now I broke stuff?

**URL:** <https://www.ruby-forum.com/t/in-a-rails3-rspec-then-require-authlogic-test-case-and-now-i-broke-stuff/194086>\
**Category:** Rails\
**Created:** [August 30, 2010, 5:38am UTC](https://www.ruby-forum.com/t/in-a-rails3-rspec-then-require-authlogic-test-case-and-now-i-broke-stuff/194086 "2010-08-30T05:38:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@Rick\_R](https://www.ruby-forum.com/u/Rick_R)\
**Post date:** [August 30, 2010, 5:38am UTC](https://www.ruby-forum.com/t/in-a-rails3-rspec-then-require-authlogic-test-case-and-now-i-broke-stuff/194086/1 "2010-08-30T05:38:04Z")

</div>

I’m a newb here and probably shouldn’t be using Rails3 yet to start  
with,  
but for some reason I was feeling adventurous.

I’m also learning to use rspec along the way and things ‘were’ working  
out  
with my ‘rake spec’ until I tried to follow some examples for test  
Authlogic with rspec.  
I ‘think’ what started the problems was when I added at the top of a  
controller test:

require ‘authlogic/test\_case’

After doing that, I seemed to have to re-run ‘bundle install’ (or maybe  
that  
was triggered because I touched the Gemfile, even though I ended up not  
adding changes to it.)

I was prompted with:

git://github.com/odorcicd/authlogic.git (at rails3) is not checked out.  
Please run `bundle install`  
/Users/rick/projects/rails/sillymeters/Rakefile:4:in `require’  
(See full trace by running task with --trace)

I rand bundle install, but now every time I try to run “rake spec” I end  
up  
with the following error:

rake spec  
(in /Users/rick/projects/rails/sillymeters)  
/Users/rick/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby -S bundle exec  
/Users/rick/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby -Ilib -Ispec  
“./spec/models/meter\_spec.rb” “./spec/models/user\_spec.rb”  
/Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-core-2.0.0.beta.20/lib/rspec/core/backward\_compatibility.rb:20:in  
`const_missing': uninitialized constant ActionMailer::TestCase::Behavior (NameError) from /Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-expectations-2.0.0.beta.20/lib/rspec/expectations/backward_compatibility.rb:6:in`const\_missing’  
from  
/Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-rails-2.0.0.beta.20/lib/rspec/rails/example/mailer\_example\_group.rb:9:in  
`<module:MailerExampleGroup>' from /Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-rails-2.0.0.beta.20/lib/rspec/rails/example/mailer_example_group.rb:3:in`module:Rails’  
from  
/Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-rails-2.0.0.beta.20/lib/rspec/rails/example/mailer\_example\_group.rb:2:in  
`<top (required)>' from /Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-rails-2.0.0.beta.20/lib/rspec/rails/example.rb:6:in`\<top (required)\>’  
from  
/Users/rick/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-rails-2.0.0.beta.20/lib/rspec/rails.rb:10:in  
`<top (required)>' from /Users/rick/projects/rails/sillymeters/spec/spec_helper.rb:5:in`\<top (required)\>’  
from ./spec/models/meter\_spec.rb:1:in `require' from ./spec/models/meter_spec.rb:1:in`’

I don’t know what went wrong? I even removed the test file that had  
“require  
‘authlogic/test\_case’” but now I’m still getting the error.  
Again, things were working ok until I had to do ‘bundle install’ again

–  
Rick R

---

<div class="post-metadata">

**Author:** ![Rick\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/71c47a/32.png) [@Rick\_R](https://www.ruby-forum.com/u/Rick_R)\
**Post date:** [August 30, 2010, 6:03am UTC](https://www.ruby-forum.com/t/in-a-rails3-rspec-then-require-authlogic-test-case-and-now-i-broke-stuff/194086/2 "2010-08-30T06:03:15Z")

</div>

On Sun, Aug 29, 2010 at 11:36 PM, Rick R [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I ‘think’ what started the problems was when I added at the top of a  
> controller test:
> 
> require ‘authlogic/test\_case’
> 
> After doing that, I seemed to have to re-run ‘bundle install’ (or maybe  
> that was triggered because I touched the Gemfile, even though I ended up not  
> adding changes to it.)

Interestingly I updated my rails version to rails3.0.0 from the  
3.0.0.beta  
and now things are working again. Guess I’ll consider the problem solved  
for  
now.
