Sha256: 9d0169d29b48797b25c2ef08f3db41e75d5a3d2913807b6dd3505ff6393684ab
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
require 'icuke/icuke_world' module ICukeWorld # Blatantly ripped from Capybara: (http://github.com/jnicklas/capybara) # # This block rewrites each of the driver methods in ICukeWorld to make # them available as "bare" methods on the World object. # # icuke_driver.screen becomes #screen, for example. icuke_driver.tap # becomes #tap. # # Obviously this is just syntactic sugar, but isn't that what makes life # worth living? # # The trap with this is that some of the methods produced by this # rewriting may conflict with other methods that are already in the World # object. For example, there is a #drag method added by Capybara that # conflicts with the #drag method in ICukeWorld. # # If you're stuck with this conflict, require 'icuke/cucumber_compat' # instead of 'icuke/cucumber' to get the methods still scoped to an # icuke_driver object. # ICuke::SimulatorDriver::DSL_METHODS.each do |method| class_eval %Q{ def #{method}(*args, &block) icuke_driver.#{method}(*args, &block) end }, __FILE__, __LINE__ end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
iCuke-0.7.0 | lib/icuke/cucumber.rb |
iCuke-0.6.6 | lib/icuke/cucumber.rb |
iCuke-0.6.5 | lib/icuke/cucumber.rb |
iCuke-0.6.4 | lib/icuke/cucumber.rb |