search for: player_test

Displaying 2 results from an estimated 2 matches for "player_test".

2006 Mar 19
4
Trouble with composed_of
...can do players(:first).card1.suit # => ''s'' But I can''t assign it: players(:first).card = nil Causes NoMethodError: You have a nil object when you didn''t expect it! The error occured while evaluating nil.card1 (eval):3:in `card1='' test/unit/player_test.rb:51:in `test_validate_cards'' There is no validation for card1 in the Player class. For some reason I simply can''t assign card1. What am I doing wrong? Pat
2006 Jun 07
6
I want to stick my models in a module
...otFound: The class "Player" was not found. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:403:in `find'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:478:in `players'' test/unit/trainer/player_test.rb:48:in `test_validate_range'' I''ve tried creating a model with script/generate model Trainer::Foo just to see if there was any difference, but it looks like I have it all right. Do I need to do any special class loading or something? By the way, I''ve also changed the t...