When i am testing its gives following error.
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
amir_z
April 26, 2012, 2:54pm
2
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: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: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: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: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: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: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: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: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: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: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: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:in `full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
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:in
new’
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:in
each’
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:in
each’
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: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: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: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: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: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: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: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: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: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: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: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: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:in
full_setup’
15 tests, 0 assertions, 0 failures, 15 errors
amir_z
April 26, 2012, 3:02pm
3
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
amir_z
April 26, 2012, 3:02pm
4
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
amir_z
April 26, 2012, 3:04pm
5
I removed the remember_me from fixture file but still have the same
problem.
amir_z
April 26, 2012, 3:08pm
6
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
amir_z
April 27, 2012, 11:36am
7
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
amir_z
April 26, 2012, 3:13pm
8
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?
amir_z
April 26, 2012, 3:31pm
9
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
amir_z
April 27, 2012, 11:50am
10
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
amir_z
April 30, 2012, 2:23pm
11
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.
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.
amir_z
April 30, 2012, 2:39pm
12
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
amir_z
May 1, 2012, 10:15am
13
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 that was the
problem. Now my tests are working fine.
You was right form the post one.
I am just freaky guy, need some time to learn things.
Thanks Colin one again.
Amir