2014/08/13分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
[ci skip] Updated where scope to conform to new style
activerecord/lib/active_record/associations.rb
のdocの修正です。
サンプルのwhere
メソッドの書き方を修正しています。
- # belongs_to :valid_coupon, ->(o) { where "discounts > #{o.payments_count}" }, + # belongs_to :valid_coupon, ->(o) { where "discounts > ?", o.payments_count },
index_exists?
with :name
checks specified columns.
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
の修正です。
index_exists?
メソッドがカラム名のチェックも行うよう修正しています。
# Before: index_exists? :articles, :title, name: "idx_title" # => `true` index_exists? :articles, :body, name: "idx_title" # => `true` # After: index_exists? :articles, :title, name: "idx_title" # => `true` index_exists? :articles, :body, name: "idx_title" # => `false`
より正確にチェックされるようになったのですが、微妙に非互換なので、ちょっと注意が必要そうな。
[ci skip] fix spelling of override
各テストファイルの修正です。
overriden
をoverridden
に修正しています。typoの修正ですね。
AM, AP, AV, and AMo tests are already order_independent!
各テストファイルの修正です。
ActionMailer
、ActionPack
、ActionView
、ActiveModel
については、テストが実行順序に依存してない、との事なので、ActiveSupport::TestCase.my_tests_are_order_dependent!
の呼び出しを削除しています。
Duplicated method in the test helper
activesupport/test/dependencies_test.rb
の修正です。
重複しているメソッドを削除しています。
Reset ActiveSupport::Dependencies.mechanism to make tests order independent
activesupport/test/dependencies_test.rb
の修正です。
実行順序に依存してしまっているテストがあったのを修正しています。
with_loading
というテスト用のヘルパーメソッドがあるのですが、それの呼び出しが足りて無かったようです。
AS tests are now order_independent!
activesupport/test/abstract_unit.rb
の修正です。
上記対応に伴い、ActiveSupport
もテストが実行順序に依存しなくなったので、ActiveSupport::TestCase.my_tests_are_order_dependent!
を削除しています。
Fix Railties tests that were order dependent
railties/test/generators_test.rb
の修正です。
Rails::Generators.fallbacks
を削除する後処理が足りて無かったのを対応しています。
Railties tests are order_independent! Hopefully.
railties/test/abstract_unit.rb
の修正です。
上記対応に伴い、Railties
もテストが実行順序に依存しなくなったので、ActiveSupport::TestCase.my_tests_are_order_dependent!
を削除しています。
[ci skip] correct default cache store class
actionpack/lib/action_controller/caching.rb
のdocの修正です。
docのデフォルトのcache store classの説明を修正しています。FileStoreがデフォルト。
actionmailer_tests_are_order_dependent!
actionmailer/test/abstract_unit.rb
の修正です。
ActionMailer
のテストについては、まだテストが実行順に依存していらしく、ActiveSupport::TestCase.my_tests_are_order_dependent!
を戻しています。
use :test delivery method for base_test.rb
actionmailer/test/abstract_unit.rb
、
actionmailer/test/base_test.rb
の修正です。
setup
でActionMailer::Base.delivery_method
にtestを指定するよう対応しています。
これで対応完了のようなので、再度ActiveSupport::TestCase.my_tests_are_order_dependent!
を削除しています。