1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Sean Griffin
05dd3df35d Remove Column#primary
It appears to have been used at some point in the past, but is no longer
used in any meaningful way. Whether a column is considered primary is
a property of the model, not the schema/column. This also removes the
need for yet another layer of caching of the model's schema, and we can
leave that to the schema cache.
2014-05-23 11:09:48 -07:00
Yves Senn
0b33c06475 Merge pull request #14524 from tgxworld/fix_unsubscribe_from_notifications
Fix tests not unsubscribing from Notifications.
2014-03-29 14:53:29 +01:00
Guo Xiang Tan
0212a41700 Fix tests not unsubscribing from Notifications.
See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
2014-03-28 18:56:40 -07:00
Guo Xiang Tan
3baace687c Use teardown helper method.
Follow-Up to https://github.com/rails/rails/pull/14348

Ensure that SQLCounter.clear_log is called after each test.

This is a step to prevent side effects when running tests. This will allow us to run them in random order.
2014-03-14 20:48:59 -07:00
Yves Senn
97f0d9a0dd log bind variables after they were type casted.
The log output used to be confusing in situation where type casting has
"unexpected" effects. For example when finding records with a `String`.

BEFORE:

irb(main):002:0> Event.find("im-no-integer")
D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", "im-no-integer"]]

AFTER:

irb(main):002:0> Event.find("im-no-integer")
D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", 0]]
2013-11-09 11:23:34 +01:00
Rafael Mendonça França
bd09afb5fb Don't skip tests if we don't need to.
We can conditional define the tests depending on the adapter or
connection.

Lets keep the skip for fail tests that need to be fixed.
2013-11-08 13:59:07 -02:00
Francesco Rodriguez
53b12cfd2e fix todo: use minitest skip instead of return nil 2012-05-13 02:27:52 -05:00
Aaron Patterson
61774e0d49 please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926 Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. 2011-06-04 23:47:03 +01:00
Aaron Patterson
eebb19c954 use index based substitution for bind parameters 2011-04-13 09:42:51 -07:00
Aaron Patterson
339ad0d002 fixing tests on 1.8, using a list of lists because order is important 2011-02-10 14:17:09 -08:00
Aaron Patterson
61b69338b2 simplify bind parameter logging 2011-02-10 13:54:29 -08:00
Aaron Patterson
2f49cd91b7 bind parameters are logged to debug log 2011-02-10 13:34:33 -08:00
Aaron Patterson
028016ede3 test cases for bind parameter logging 2011-02-10 09:56:50 -08:00