Merge pull request #623 from noelrappin/master

fix for rspec deprecation
This commit is contained in:
Steve Klabnik 2014-06-03 04:00:59 +03:00
commit c44894373c
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,11 @@ module Draper
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! }