aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index d22f3c0ff..52752dca5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -13,6 +13,10 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov.start('rails') do
add_filter 'commonlib'
add_filter 'vendor/plugins'
+ add_filter 'lib/strip_attributes'
+ add_filter 'lib/has_tag_string'
+ add_filter 'lib/acts_as_xapian'
+ add_filter 'lib/themes'
end
Spork.prefork do
@@ -183,11 +187,16 @@ Spork.prefork do
end
end
+ # Reset the default locale, making sure that the previous default locale
+ # is also cleared from the fallbacks
def with_default_locale(locale)
original_default_locale = I18n.default_locale
+ original_fallbacks = I18n.fallbacks
+ I18n.fallbacks = nil
I18n.default_locale = locale
yield
ensure
+ I18n.fallbacks = original_fallbacks
I18n.default_locale = original_default_locale
end