1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/migration
Brandon Weiss 0965863564 Closes rails/rails#18864: Renaming transactional fixtures to transactional tests
I’m renaming all instances of `use_transcational_fixtures` to
`use_transactional_tests` and “transactional fixtures” to
“transactional tests”.

I’m deprecating `use_transactional_fixtures=`. So anyone who is
explicitly setting this will get a warning telling them to use
`use_transactional_tests=` instead.

I’m maintaining backwards compatibility—both forms will work.
`use_transactional_tests` will check to see if
`use_transactional_fixtures` is set and use that, otherwise it will use
itself. But because `use_transactional_tests` is a class attribute
(created with `class_attribute`) this requires a little bit of hoop
jumping. The writer method that `class_attribute` generates defines a
new reader method that return the value being set. Which means we can’t
set the default of `true` using `use_transactional_tests=` as was done
previously because that won’t take into account anyone using
`use_transactional_fixtures`. Instead I defined the reader method
manually and it checks `use_transactional_fixtures`. If it was set then
it should be used, otherwise it should return the default, which is
`true`. If someone uses `use_transactional_tests=` then it will
overwrite the backwards-compatible method with whatever they set.
2015-03-16 11:35:44 -07:00
..
change_schema_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
change_table_test.rb The short-hand methods should be able to define multiple columns 2015-02-23 07:46:45 +09:00
column_attributes_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
column_positioning_test.rb Remove unused accessor 2015-01-19 08:18:08 +09:00
columns_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
command_recorder_test.rb add test to ensure remove_reference with index and fk is invertable. 2015-02-11 11:20:59 +01:00
create_join_table_test.rb tests, favor drop_table and :if_exists over raw SQL. 2015-03-02 17:43:01 +01:00
foreign_key_test.rb Merge pull request #18662 from estum/foreign-key-exists 2015-02-16 09:39:59 +01:00
helper.rb Bring original puts back after finishing tests 2014-08-29 10:34:26 +09:00
index_test.rb raise a better exception for renaming long indexes 2014-11-20 17:37:54 -08:00
logger_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
pending_migrations_test.rb rename MiniTest to Minitest 2014-08-02 21:30:28 +05:30
references_foreign_key_test.rb prefer drop_table :table, if_exists: true over explicit checks. 2015-02-11 11:21:00 +01:00
references_index_test.rb Use type column first in multi-column indexes 2014-10-24 16:34:30 -04:00
references_statements_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
rename_table_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
table_and_index_test.rb tests, use drop_table if_exists: true in our test suite. 2015-01-20 13:30:12 +01:00