Amir Z.
2012-Apr-25 07:39 UTC
ArgumentError: Bad fixture argument 2 during creation of User fixture
I am newbie working railspace application, its going smoothly. :)getting something much better in this. I developed code for login logout and registration and code is working fine but as i am running test for it. it is giving following error. "ArgumentError: Bad fixture argument 2 during creation of User fixture" I tried a lot but couldn''t solve the error. Please let me know if you have any input or suggestion. Do the needful Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-25 10:22 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
Some time before my test was working fine. Now getting errors in all test 12test assertion 0 : failure 0; error 12 Please help me out. I want to git rid of this problem. Thanks in advance Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-25 10:28 UTC
Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 25 April 2012 11:22, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Some time before my test was working fine. Now getting errors in all > test > 12test assertion 0 : failure 0; error 12 > Please help me out. I want to git rid of this problem.Assuming that you are using a version control system (git for example) then roll back to a version that worked then work forwards till you find what you changed that caused the problem. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-25 12:27 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
Hey Colin ! I am happy to see you here and I am sure you are going to help me out this time also :) I am trying to check where is the mistake. Let come back to you after getting error :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-25 12:28 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
Hey Colin ! I am happy to see you here and I am sure you are going to help me out this time also :). I am trying to check where is the mistake. Lets come back to you after getting error :). -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-26 07:34 UTC
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: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org password: foobar remember_me: authorization_token: 1 invalid_user: id: 2 screen_name: time email: tim-1gq3EaV1hkM@public.gmane.org password: time remember_me: authorization_token: 2 How we can remove this error from testing part. Any help is appreciable Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-26 12:54 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
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'' 10) 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'' 11) 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'' 12) 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'' 13) 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'' 14) 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'' 15) 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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-26 13:00 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 26 April 2012 08:34, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > password: foobar > remember_me: > authorization_token: 1yml is very strict about formatting. You need spaces at the front of nested lines, so valid_user: id: 1 screen_name: foobar email: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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> > invalid_user: > id: 2 > screen_name: time > email: tim-1gq3EaV1hkM@public.gmane.org > password: time > remember_me: > authorization_token: 2 > > > How we can remove this error from testing part. > > Any help is appreciable > > Thanks > Amir > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-26 13:02 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
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 [](key) @fixture[key] end def to_hash @fixture end -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-26 13:04 UTC
Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
I removed the remember_me from fixture file but still have the same problem. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-26 13:07 UTC
Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 26 April 2012 14:04, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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> > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-26 13:13 UTC
Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
> 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? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-26 13:28 UTC
Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 26 April 2012 14:13, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-27 09:36 UTC
Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
> yml is very strict about formatting. You need spaces at the front of > nested lines, so > valid_user: > id: 1 > screen_name: foobar > email: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > 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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-27 09:48 UTC
Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 27 April 2012 10:36, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> yml is very strict about formatting. You need spaces at the front of >> nested lines, so >> valid_user: >> id: 1 >> screen_name: foobar >> email: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> 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.Have you got the spaces at the front of the nested lines? Copy and paste the file here. Colin> > Amir > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-Apr-30 12:23 UTC
Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
> Have you got the spaces at the front of the nested lines? > > Copy and paste the file here. > > ColinDear Colin below is yml file. # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html valid_user: id: 1 screen_name: foobar email: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org password: foobar authorization_token: 1 invalid_user: id: 2 screen_name: time email: tim-1gq3EaV1hkM@public.gmane.org password: time authorization_token: 2 Please let me know where I am wrong. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Apr-30 12:38 UTC
Re: Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
On 30 April 2012 13:23, Amir Z. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> 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: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > password: foobar > authorization_token: 1 > > invalid_user: > id: 2 > screen_name: time > email: tim-1gq3EaV1hkM@public.gmane.org > 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: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amir Z.
2012-May-01 08:15 UTC
Re: Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture
> yml is very strict about formatting. You need spaces at the front of > nested lines, so > valid_user: > id: 1 > screen_name: foobar > email: foobar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > 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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.