Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 2b2fd03640f03ac3bb0f687f9da594fb463dd666 1 parent 930dbbb
Francesco Rodriguez authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 activerecord/test/cases/base_test.rb
View
10 activerecord/test/cases/base_test.rb
@@ -466,13 +466,13 @@ def test_table_name_guesses_with_inherited_prefixes_and_suffixes
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)
Please sign in to comment.
Something went wrong with that request. Please try again.