Skip to content

Commit

Permalink
silence expected deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Cichra committed Nov 5, 2014
1 parent c8b6e93 commit 498e730
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,16 @@ class ::ActionView::Base
config.before(:each) do
Formtastic::Localizer.cache.clear!
end


config.before(:each) do
allow(Formtastic.deprecation).to receive(:deprecation_warning).and_call_original
# TODO: Remove this in Formtastic 4
[ :action_class, :standard_action_class_name, :custom_action_class_name,
:input_class, :standard_input_class_name, :custom_input_class_name ].each do |method|
allow(Formtastic.deprecation).to receive(:deprecation_warning).with(method, instance_of(String), instance_of(Array))
end
end

config.before(:all) do
DeferredGarbageCollection.start unless ENV["DEFER_GC"] == "false"
end
Expand Down

0 comments on commit 498e730

Please sign in to comment.