No help from the log

Upon synching up, a colleague noticed that I had a test failing… kinda odd since I've been (trying to be) pretty good about keeping things up to date. Running them myself, we noticed that I was actually experiencing a quiet error message that was preventing my unit tests from running at all. I had been seeing the familiar "0 failures, 0 errors" message for the functional tests and not really noticing that there was no message at all for my unit tests.

Running a trace (and paying attention now 🙂 ) it seemed to be experiencing an error executing the integration tests.

The helpful error message? … rake aborted!

Can you expand on that? … Test failures

oh, thanks!

After a good hour of banging my head against the wall I modified the rakefile's default task:
task :default => [:test_units, :test_functional]

Now, the rerun actually gave me a decent error!
Mysql::Error: Table 'tags' already exists: CREATE TABLE tags (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `code` int(11), `name` varchar(255)) ENGINE=InnoDB

10 seconds later I had dropped the table – let the rake recreate it itself – and everything was fine! Would have been nice if I didn't have to hold it's head underwater to get that information out of it!

Advertisements

Leave a comment

Filed under rails, Ruby, Test Driven Development (TDD)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s