diff --git a/lib/capybara/dsl.rb b/lib/capybara/dsl.rb index 232bfa99..9cabf629 100644 --- a/lib/capybara/dsl.rb +++ b/lib/capybara/dsl.rb @@ -2,6 +2,15 @@ require 'capybara' module Capybara module DSL + def self.included(base) + warn "including Capybara::DSL in the global scope is not recommended!" if base == Object + super + end + + def self.extended(base) + warn "extending the main object with Capybara::DSL is not recommended!" if base == TOPLEVEL_BINDING.eval("self") + super + end ## #