ArgumentError: Bad fixture argument 2 during creation of User fixture

When i am testing its gives following error.

  1. Error:
    test_truth(RememberMeTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    .
    .
    .
    .
    .
    .1 tests, 0 assertions, 0 failures, 1 errors
    rake aborted!
    Command failed with status (1): [Routes…/IR/ruby/bin/ruby -…]

(See full trace by running task with --trace

Users.yml file is…path test/fixtures/users.yml

valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

invalid_user:
id: 2
screen_name: time
email: [email protected]
password: time
remember_me:
authorization_token: 2

How we can remove this error from testing part.

Any help is appreciable

Thanks
Amir

testing result

b/active_record/fixtures.rb:676:in read_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:549:ininitialize’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/fixtures.rb:509:in new' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:increate_fixtures’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/fixtures.rb:508:in map' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:increate_fixtures’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/connection_adapters/mysql_adapter.rb:234:in
disable_referential _integrity' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:505:increate_fixtures’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/base.rb:1198:in silence' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:504:increate_fixtures’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/fixtures.rb:1000:in load_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:934:insetup_with_fixtures’
C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
b/active_record/fixtures.rb:978:in `full_setup’

  1. Error:
    test_navigation_logged_in(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

  2. Error:
    test_navigation_not_logged_in(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

  3. Error:
    test_register_friendly_url_forwarding(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

  4. Error:
    test_registration_failure(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

  5. Error:
    test_registration_page(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

  6. Error:
    test_registration_success(UserControllerTest):
    ArgumentError: Bad fixture argument 2 during creation of User fixture
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:770:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:712:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:712:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:707:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:707:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:706:ineach’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:706:in read_yaml_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:676:inread_fixture_files’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:549:in initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:509:innew’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:509:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:508:inmap’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:508:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/connection_adapters/mysql_adapter.rb:234:indisable_referential
    _integrity’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:505:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/base.rb:1198:insilence’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:504:in create_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:1000:inload_fixtures’
    C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li
    b/active_record/fixtures.rb:934:in setup_with_fixtures' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:978:infull_setup’

15 tests, 0 assertions, 0 failures, 15 errors

On 26 April 2012 08:34, Amir Z. [email protected] wrote:

.
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

I am not sure whether remember_me with no value is permitted.
Possibly best to leave out the whole line. Make sure you do not have
any tabs. I don’t know whether this is the cause of the problem
however.

Colin

what is in fixture.rb

def initialize(fixture, class_name)
case fixture
when Hash, YAML::Omap
@fixture = fixture
when String
@fixture = read_fixture_file(fixture)
else
raise ArgumentError, “Bad fixture argument #{fixture.inspect}
“Line no 770” during creation of #{class_name} fixture”
end

@class_name = class_name

end

def each
@fixture.each { |item| yield item }
end

def
@fixture[key]
end

def to_hash
@fixture
end

I removed the remember_me from fixture file but still have the same
problem.

On 26 April 2012 14:04, Amir Z. [email protected] wrote:

Please quote the previous message when replying. To someone reading
this message it means nothing so they have to go and find the previous
email to work out what you are talking about.

I removed the remember_me from fixture file but still have the same
problem.

What about the spaces at the front of the lines? Though looking at
the error I do not think this is the problem.

Colin

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

Note the spaces at the front of each line. Make sure there are no
tabs in the file.

I am sure there is no tab in yml file. There is only single space
between attribute and value.

Amir

What about the spaces at the front of the lines? Though looking at
the error I do not think this is the problem.

what kind of spaces you are talking about?

On 26 April 2012 14:13, Amir Z. [email protected] wrote:

What about the spaces at the front of the lines? Though looking at
the error I do not think this is the problem.

what kind of spaces you are talking about?

From my previous email:

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

Note the spaces at the front of each line. Make sure there are no
tabs in the file.

Colin

On 27 April 2012 10:36, Amir Z. [email protected] wrote:

Note the spaces at the front of each line. Make sure there are no
tabs in the file.

I am sure there is no tab in yml file. There is only single space
between attribute and value.

Have you got the spaces at the front of the nested lines?

Copy and paste the file here.

Colin

Have you got the spaces at the front of the nested lines?

Copy and paste the file here.

Colin

Dear Colin below is yml file.

Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
authorization_token: 1

invalid_user:
id: 2
screen_name: time
email: [email protected]
password: time
authorization_token: 2

Please let me know where I am wrong.

On 30 April 2012 13:23, Amir Z. [email protected] wrote:

valid_user:
password: time
authorization_token: 2

Please let me know where I am wrong.

I don’t know how many times in this thread I have pointed out that you
need spaces in front of the nested lines. In fact in my very first
reply I posted:

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

Note the spaces in front of id:, screen_name: and so on.

Also note the first line of the file you posted, it gives you a link
to find out more. Did you go and look at that?

Colin

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: [email protected]
password: foobar
remember_me:
authorization_token: 1

Note the spaces in front of id:, screen_name: and so on.

Colin I was not getting about nested lines and spaces :slight_smile: that was the
problem. Now my tests are working fine.

You was right form the post one. :slight_smile:

I am just freaky guy, need some time to learn things.

Thanks Colin one again.

Amir