[rspec-users] rSpec on Rails 1.2?

Courtenay court3nay at gmail.com
Fri Nov 24 23:02:01 EST 2006


Add this line to spec_helper.rb so your testcase subclasses inherit
the parent's fixture path and it restores the 'old' way of rails'
fixtures.

module Spec
  module Rails
    class EvalContext < Test::Unit::TestCase
      self.use_transactional_fixtures = true
      self.use_instantiated_fixtures  = false
      self.fixture_path = RAILS_ROOT + '/spec/fixtures'
+    cattr_accessor :fixture_path
      ...
    end
  end
end

>I found the cause, it looks like this revision of edge rails
>introduced the error we are seeing in rspec.   http://
>dev.rubyonrails.org/changeset/5604
>
>-Chad
>
>On Nov 24, 2006, at 2:11 AM, s.ross wrote:
>
>> I just updated my Rails install to the most current Edge and my
>> controller specs fail:
>>
>> 1)
>> TypeError in 'The User Controller should be a user controller'
>> can't convert nil into String
>>
>> Each spec fails the same way.
>>
>> <context string> <spec string>
>> can't convert nil into String
>>
>> Any ideas what's up with this?
>>
>> Thanks,
>>
>> s.ross


More information about the rspec-users mailing list