diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-08-27 13:49:22 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-08-27 13:49:22 -0500 |
commit | 2b2fd03640f03ac3bb0f687f9da594fb463dd666 (patch) | |
tree | 64d33cd0f064c9257562f8424796230f1521a171 /activerecord | |
parent | 930dbbbcff71dfb1818549ea936aabe91cc357a6 (diff) | |
download | rails-2b2fd03640f03ac3bb0f687f9da594fb463dd666.tar.gz rails-2b2fd03640f03ac3bb0f687f9da594fb463dd666.tar.bz2 rails-2b2fd03640f03ac3bb0f687f9da594fb463dd666.zip |
fix order dependent test in AR::BasicsTest
This test https://github.com/rails/rails/blob/master/activerecord/test/cases/base_test.rb#L381
is failing because is not setting `CreditCard.pluralize_table_name` to `false`.
In this case, i prefer to change to another model that is not in the `GUESSED_CLASSES`
array.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 6c65183768..c6f7e8cf0f 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -466,13 +466,13 @@ class BasicsTest < ActiveRecord::TestCase end def test_singular_table_name_guesses_for_individual_table - CreditCard.pluralize_table_names = false - CreditCard.reset_table_name - assert_equal "credit_card", CreditCard.table_name + Post.pluralize_table_names = false + Post.reset_table_name + assert_equal "post", Post.table_name assert_equal "categories", Category.table_name ensure - CreditCard.pluralize_table_names = true - CreditCard.reset_table_name + Post.pluralize_table_names = true + Post.reset_table_name end if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter) |