Sha256: 5df1914d11694381e90a621e1d529443efce33a71ca63a4ec130f2d6553c19d0
Contents?: true
Size: 712 Bytes
Versions: 16
Compression:
Stored size: 712 Bytes
Contents
module WatirSplash # main helper module # # these methods can be used in specs directly module SpecHelper def method_missing name, *args #:nodoc: if WatirSplash::Browser.current.respond_to?(name) SpecHelper.module_eval %Q[ def #{name}(*args) WatirSplash::Browser.current.send(:#{name}, *args) {yield} end ] self.send(name, *args) {yield} else super end end # make sure that using method 'p' will be invoked on browser # and not Kernel # use Kernel.p if you need to dump some variable def p *args #:nodoc: WatirSplash::Browser.current.p *args end end end
Version data entries
16 entries across 16 versions & 1 rubygems