Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # keep Watir::Wait as is
- # new module
- module Watir
- module WaitHelper # or another name?
- def wait_until(*args, &blk)
- Wait.until(*args, &blk)
- end
- def wait_while(*args, &blk)
- Wait.while(*args, &blk)
- end
- end
- end
- #
- # in rspec
- #
- Spec::Runner.configure do |config|
- config.include(Watir::WaitHelper)
- end
- it "should wait" do
- wait_until { ... }
- end
- #
- # in cucumber
- #
- World(Watir::WaitHelper)
- Given /foo bar/ do
- wait_until { ... }
- end
Add Comment
Please, Sign In to add comment