Thursday, April 26, 2012
On 26 April 2012 08:34, Amir Z. <lists@ruby-forum.com> 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@gmail.com
> 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: foobar@gmail.com
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@tim.com
> 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@googlegroups.com.
> 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@googlegroups.com.
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.
0 comments:
Post a Comment