lib/draper/test/rspec_integration.rb in draper-2.1.0 vs lib/draper/test/rspec_integration.rb in draper-3.0.0.pre1
- old
+ new
@@ -5,14 +5,10 @@
included { metadata[:type] = :decorator }
end
RSpec.configure do |config|
- if RSpec::Core::Version::STRING.starts_with?("3")
- config.include DecoratorExampleGroup, file_path: %r{spec/decorators}, type: :decorator
- else
- config.include DecoratorExampleGroup, example_group: {file_path: %r{spec/decorators}}, type: :decorator
- end
+ config.include DecoratorExampleGroup, file_path: %r{spec/decorators}, type: :decorator
[:decorator, :controller, :mailer].each do |type|
config.before(:each, type: type) { Draper::ViewContext.clear! }
end
end