Error when running tests on wagn master

Support Ticket

+status
closed
+tags
 

I set up a wagn postgresql development environment with:

git clone ...

bundle install --without mysql

ENGINE=postgres MODE=dev rake wagn:install

vi config/database.yml

rake wagn:create

RELOAD_TEST_DATA=true rake db:test:prepare

Now I find that I cannot run any tests. With "rake cucumber" I get:

Missing codename set (SetID) /full/path/to/lib/cardlib/rules.rb:6 in '<module:Rules>'

With "rake" or "rake test" I get:

With plain "rake" or "rake test" I get:

/full/path/to/card.rb:56:in `const_missing': Missing codename set (SetID)...

(but the rest of the error message is identical).

 

Am I missing a step? A quick glance at const_missing appears to be defining the const dynamically by finding a card called "set", and if that doesn't exist perhaps there is some database seeding that I need to do?

 

 

Cool that you're setting up a test environment!

 

Yes, it does appear that something is up with the data.  Is there any data in the test db at all?  I'm not immediately seeing the problem in your commands.  Are you seeing any weird messages after you do the db:test:prepare?

 

I'm going to try to reproduce the bug.  I doubt this will solve the problem, but it might be worth trying a slightly more explicit call of `bundle exec env RELOAD_TEST_DATA=true rake db:test:prepare`.

 

Also, if you're willing to paste your database.yml file, that might help, though I'm guessing you're probably familiar with the common errors there...


Just to close the loop in this -- found the issue, it was a "0" for the boolean "trash" value in test/fixture/cards.yml. Fixed in 45902f9bb76, and I see it's already merged in, so the only thing left to do here is make sure that when fixture data is dumped to YAML files in the future, the rake tasks ensure the resulting YAML is compatible with all supported database backends. (Which is probably already done for the seed data? I haven't looked.)

 

Cheers!

--Brett Neumeier.....2013-05-20 22:27:33 +0000