[rspec-users] Error: undefined method `use_transactional_fixtures
Jason Fb
lists at ruby-forum.com
Fri Feb 26 14:44:08 EST 2010
This happens when you generate tests pre-Rails 2.3 then upgrade to Rails
2.3.
go to test/test_helper.rb and change:
class Test::Unit::testCase
to:
class ActiveSupport::TestCase
http://www.datatravels.com/technotes/2009/04/21/rails-error-undefined-method-use_transactional_fix/
waseem ahmad wrote:
> Hi,
>
> I get this error when I do
>
> $spec /spec/any_spec
>
> /home/waseem/app/spec/spec_helper.rb:14: undefined method
> `use_transactional_fixtures=' for
> #<Spec::Example::Configuration:0xb6d9f218>
> (NoMethodError)
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb:184:in
> `configure'
> from /home/waseem/app/spec/spec_helper.rb:10
> from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
> from ./spec/controllers/user_sessions_controller_spec.rb:1
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/example_group_runner.rb:14:in
> `load'
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/example_group_runner.rb:14:in
> `load_files'
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/example_group_runner.rb:13:in
> `each'
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/example_group_runner.rb:13:in
> `load_files'
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:98:in
> `run_examples'
> from
> /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/command_line.rb:10:in
> `run'
> from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/bin/spec:4
> from /usr/bin/spec:19:in `load'
> from /usr/bin/spec:19
>
> I googled it and got
> http://ryandaigle.com/articles/2008/11/19/what-s-new-in-edge-rails-application-rb-duality-is-no-moresee
> Maxim's comment
>
> What could be possibly wrong?
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list