spec/spec_helper.rb in i18n-js-3.0.0.rc5 vs spec/spec_helper.rb in i18n-js-3.0.0.rc6
- old
+ new
@@ -5,12 +5,12 @@
require "i18n/js"
module Helpers
# Set the configuration as the current one
def set_config(path)
- config = HashWithIndifferentAccess.new(YAML.load_file(File.dirname(__FILE__) + "/fixtures/#{path}"))
- I18n::JS.stub(:config? => true, :config => config)
+ config_file = File.dirname(__FILE__) + "/fixtures/#{path}"
+ I18n::JS.stub(:config? => true, :config_file => config_file)
end
# Shortcut to I18n::JS.translations
def translations
I18n::JS.translations
@@ -35,7 +35,15 @@
config.after do
FileUtils.rm_rf(temp_path)
end
config.include Helpers
+
+ # Remove deprecation warnings
+ config.expect_with :rspec do |c|
+ c.syntax = [:should, :expect]
+ end
+ config.mock_with :rspec do |c|
+ c.syntax = [:should, :expect]
+ end
end