diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-08-19 22:37:18 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-08-19 22:37:18 -0300 |
commit | e43271444b298c0aeed76fe6af444986c58c47c7 (patch) | |
tree | 1b16551b884e0bd78a81c32aa08787091820a62b /railties/test | |
parent | 6e420aa99c60b214b2586abf1be2649d0ebf1fcf (diff) | |
download | rails-e43271444b298c0aeed76fe6af444986c58c47c7.tar.gz rails-e43271444b298c0aeed76fe6af444986c58c47c7.tar.bz2 rails-e43271444b298c0aeed76fe6af444986c58c47c7.zip |
Fix failing railties tests
A combination of two commits led into these failures:
* The addition of a new active_record config in
24bb8347b6ff0da90059314d9aece7a2c94a272c
* The revert of the config to use config.x as options holder in
43073b393d234acd094ac7c220163f4e419d11f5
These tests remove activerecord from the load path, however the
configuration is still in the application file, and they blow up.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 92d6a1729c..b38cc4277e 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -276,8 +276,12 @@ module TestHelpers end def use_frameworks(arr) - to_remove = [:actionmailer, - :activerecord] - arr + to_remove = [:actionmailer, :activerecord] - arr + + if to_remove.include?(:activerecord) + remove_from_config 'config.active_record.*' + end + $:.reject! {|path| path =~ %r'/(#{to_remove.join('|')})/' } end |