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:
parent
5c79469259
commit
d153635e65
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
||||
##
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue