lib/draper/test/rspec_integration.rb in draper-1.0.0 vs lib/draper/test/rspec_integration.rb in draper-1.1.0
- old
+ new
@@ -6,7 +6,11 @@
included { metadata[:type] = :decorator }
end
RSpec.configure do |config|
config.include DecoratorExampleGroup, example_group: {file_path: %r{spec/decorators}}, type: :decorator
+
+ [:decorator, :controller, :mailer].each do |type|
+ config.after(:each, type: type) { Draper::ViewContext.clear! }
+ end
end
end