Skip to content

Instantly share code, notes, and snippets.

@kornysietsma
Created November 2, 2009 11:47
Show Gist options
  • Save kornysietsma/224104 to your computer and use it in GitHub Desktop.
Save kornysietsma/224104 to your computer and use it in GitHub Desktop.
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