[Typo] broken tests when running rake?


#1

When running rake against r1004 I am seeing a lot of failures against
MySQL
and Ruby 1.8.4. Is this the current state of things or should I not be
getting any errors?

207 tests, 197 assertions, 0 failures, 146 errors
rake aborted!
Test failures

Most of the errors seem to relate to the blog_id column an example:

ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ‘blog_id’
in
‘field list’: INSERT INTO contents (updated_at, body, guid, url,
author, type, id, blog_id, article_id, created_at, email)
VALUES (‘2004-05-02 20:00:02’, ‘Comment body italic bold’,
‘b1i2n3g4o5t6i7v’, ‘www.google.com’, ‘John Bar’, ‘Comment’, 15, 1, 14,
‘2004-05-02 20:00:02’, ‘removed_email_address@domain.invalid’)


#2

Thanks Scott!

I thought running rake db:test:prepare would take care of any migration
needs.

Also I notice it targets the DEV environment when I run it is this the
intended behaviour?

Anyway, that’s got me further now only two tests fail in r1004.

test_mt_supported_methods(BackendControllerTest):
NoMethodError: You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.length

test_mt_supported_text_filters(BackendControllerTest):
NoMethodError: You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.length


#3

rake migrate.

Scott
On 4/10/06, Steve L. removed_email_address@domain.invalid wrote:> When running
rake against r1004 I am seeing a lot of failures against MySQL> and Ruby
1.8.4. Is this the current state of things or should I not be> getting
any errors?>> 207 tests, 197 assertions, 0 failures, 146 errors> rake
aborted!> Test failures>> Most of the errors seem to relate to the
blog_id column an example:>> ActiveRecord::StatementInvalid:
Mysql::Error: Unknown column ‘blog_id’ in> ‘field list’: INSERT INTO
contents (updated_at, body, guid, url,> author, type, id,
blog_id, article_id, created_at, email)> VALUES (‘2004-05-02
20:00:02’, ‘Comment body italic bold’,> ‘b1i2n3g4o5t6i7v’, ’
www.google.com’, ‘John Bar’, ‘Comment’, 15, 1, 14,> ‘2004-05-02
20:00:02’, ‘removed_email_address@domain.invalid’)>>>
_______________________________________________> Typo-list mailing list>
removed_email_address@domain.invalid>
http://rubyforge.org/mailman/listinfo/typo-list>>


#4

On Mon, 2006-04-10 at 18:55 -0500, Steve L. wrote:

The error occured while evaluating nil.length
I’m getting the same failures. Has anyone looked into these?

I’m on 1005 fwiw.

- Scott

#5

On Apr 10, 2006, at 4:55 PM, Steve L. wrote:

I thought running rake db:test:prepare would take care of any
migration needs.

No, it just clones the dev schema to the test database.

Also I notice it targets the DEV environment when I run it is this
the intended behaviour?

if you want to target production then use rake migrate RAILS_ENV=production