Forum: Ruby on Rails undefined method 'fixtures' for UserTest:Class (NoMethodError)

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.
(Guest)
on 2009-05-18 16:55
(Received via mailing list)
Hi,
    I'm a noob trying to work through adding restful_authentication to
a blog. The login page allows me to login and I can create a post
after loggin in...but my rake:test units won't run because I'm getting
an undefined method 'fixtures' for UserTest:Class (NoMethodError) I'm
getting an error on 'fixtures: users'

==>I did move include AuthenticatedTestHelper in test/test_helper.rb
as per the instructions and commented it out in this class

here's a bigger snip of my user_test.rb------

require File.dirname(__FILE__) + '/../test_helper'

class UserTest < Test::Unit::TestCase
  # Be sure to include AuthenticatedTestHelper in test/test_helper.rb
instead.
  # Then, you can remove it from this and the functional test.
  # include AuthenticatedTestHelper
  fixtures :users
  .......
WJSimacek (Guest)
on 2009-05-18 17:06
(Received via mailing list)
On May 18, 7:54 am, "removed_email_address@domain.invalid"
<removed_email_address@domain.invalid> wrote:
> here's a bigger snip of my user_test.rb------
>
> require File.dirname(__FILE__) + '/../test_helper'
>
> class UserTest < Test::Unit::TestCase
>   # Be sure to include AuthenticatedTestHelper in test/test_helper.rb
> instead.
>   # Then, you can remove it from this and the functional test.
>   # include AuthenticatedTestHelper
>   fixtures :users
>   .......

Aaahhhhhhh => No wonder my forehead is flat from slapping it!  Of
course all I had to do was comment out the fixtures :users line to get
my unit tests to run. Sorry for wasting everyone's time! --Wayne
This topic is locked and can not be replied to.