Skip to content
Browse files

Test capybara fix

  • Loading branch information...
1 parent 0bb5834 commit 0449514d01dcf4d3cebd2e163e63a6cee1959e79 @steveklabnik steveklabnik committed
Showing with 13 additions and 5 deletions.
  1. +13 −5 lib/draper/test/rspec_integration.rb
View
18 lib/draper/test/rspec_integration.rb
@@ -12,11 +12,19 @@ module DecoratorExampleGroup
}
end
+module Draper
+ module RSpec
+ class Railtie < Rails::Railtie
+ config.after_initialize do |app|
+ if defined?(Capybara)
+ require 'capybara/rspec/matchers'
-if defined?(Capybara)
- require 'capybara/rspec/matchers'
-
- RSpec.configure do |config|
- config.include Capybara::RSpecMatchers, :type => :decorator
+ RSpec.configure do |config|
+ config.include Capybara::RSpecMatchers, :type => :decorator
+ end
+ end
+ end
+ end
end
end
+

0 comments on commit 0449514

Please sign in to comment.
Something went wrong with that request. Please try again.