NoMethodError: undefined method `assert_not'

528 views
Skip to first unread message

Adam Jacox

unread,
Nov 1, 2013, 4:09:17 PM11/1/13
to minites...@googlegroups.com
I am adding minitest-rails to an existing Rails 3.2 app. I keep getting weird behavior: i.e certain assertions are not working, migration notices each time I run the tests.

Here is a gist with the relevant files and errors:


Thanks!
Adam

Mike Moore

unread,
Nov 2, 2013, 12:16:30 PM11/2/13
to minites...@googlegroups.com
What version of ruby are you running?

Sent from Mailbox for iPhone


--
-- You received this message because you are subscribed to the Google Groups minitest-rails group. To post to this group, send email to minites...@googlegroups.com. To unsubscribe from this group, send email to minitest-rail...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/minitest-rails?hl=en
---
You received this message because you are subscribed to the Google Groups "minitest-rails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minitest-rail...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Gmail

unread,
Nov 2, 2013, 12:35:53 PM11/2/13
to minites...@googlegroups.com
1.9.3

Thanks!
You received this message because you are subscribed to a topic in the Google Groups "minitest-rails" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/minitest-rails/fCYXRF2VPfs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to minitest-rail...@googlegroups.com.

Mike Moore

unread,
Nov 2, 2013, 12:43:06 PM11/2/13
to minites...@googlegroups.com
In Rails 4 ActiveSupport::TestCase adds several assertions to that were in test/unit but were removed in minitest. But Rails 3 depends on test/unit, which on Ruby 1.9.3 is built on top of minitest. So the test/unit assertions should be there.

I'm away from my computer ATM, so it's difficult for me to check, but I'm honestly not sure where `assert_not` should be defined, of at all. Try using `refute` instead.

For the database warnings what db are you using?

Sent from Mailbox for iPhone


Adam Jacox

unread,
Nov 2, 2013, 4:57:25 PM11/2/13
to minites...@googlegroups.com
Yeah I have just reverted back to using the basic Minitest assertions. 

I'm using postgresql. I ran all migrations and rake db:test:prepare - but I continue to see those notices every time I run my tests - also the tests are really slow (could be cause it's booting the rails app each time).

Thanks for your help!
Adam
Reply all
Reply to author
Forward
0 new messages