Created
November 2, 2009 11:47
-
-
Save kornysietsma/224104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BASEDIR = File.join(File.dirname(__FILE__),"..") unless defined? BASEDIR | |
PRJDIR = File.join(File.dirname(__FILE__),"..","..","..") unless defined? PRJDIR | |
require 'spec/expectations' # rspec extras | |
require File.join(BASEDIR,'support/selenium_helper.rb') | |
require File.join(BASEDIR,'support/user_config.rb') | |
# globals - keep these to a minimum! | |
$user_config = UserConfig.new | |
$selenium_helper = SeleniumHelper.new($user_config) # better a global than a singleton - still need something global as it's used in monkey-patching bits below | |
at_exit do | |
$stderr.puts "global exit block - closing browser" | |
$selenium_helper.shutdown | |
end | |
module MyWorld | |
# add methods here you want accessible from all cucumber steps | |
end | |
World(MyWorld) | |
Before do | |
@home_page = TwitterHomePage.new(self) | |
@results_page = TwitterResultsPage.new(self) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment