lib/draper/test/rspec_integration.rb in draper-1.3.0 vs lib/draper/test/rspec_integration.rb in draper-1.3.1

- old
+ new

@@ -5,10 +5,14 @@ included { metadata[:type] = :decorator } end RSpec.configure do |config| - config.include DecoratorExampleGroup, example_group: {file_path: %r{spec/decorators}}, type: :decorator + 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 [:decorator, :controller, :mailer].each do |type| config.before(:each, type: type) { Draper::ViewContext.clear! } end end