[rspec-users] Error: undefined method `use_transactional_fixtures

David Chelimsky dchelimsky at gmail.com
Wed Jan 7 04:25:57 EST 2009


On Wed, Jan 7, 2009 at 12:29 AM, waseem ahmad <cougar2149 at gmail.com> 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-more
> see Maxim's comment
>
> What could be possibly wrong?

Seems like it's not loading up rspec-rails' Configuration object. In
order for that to happen implicitly, the specs need to be in any of
spec/models, spec/controllers, spec/views, spec/helpers. Is your file
in one of those?


> --
> Waseem
> RwrWrwRwrWrwRwrWrwRwrWrwRwwwwwwww............
> Blog: http://babygnu.blogspot.com


More information about the rspec-users mailing list