1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

print warning when including Capybara::DSL globally

This commit is contained in:
Jonas Nicklas 2012-09-01 18:22:13 +02:00
parent 5c79469259
commit d153635e65

View file

@ -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
##
#