Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to watircraft 0.4.0

  • Loading branch information...
commit 39b11be54a841282029b7b8a4cc132fbc288d6ff 1 parent 5d669e7
@bret authored
View
9 watircraft/lib/site_start.rb
@@ -0,0 +1,9 @@
+require 'initialize'
+require 'depot'
+
+SITE = Depot::Depot.new
+at_exit {SITE.close}
+
+require 'spec/expectations'
+START = SITE.execution_context
+START.extend Spec::Expectations
View
9 watircraft/lib/spec_initialize.rb
@@ -2,18 +2,13 @@
# Do not edit this file. It will be automatically replaced when you
# upgrade to newer versions of watircraft.
-require 'depot'
+require 'site_start'
require 'spec'
require 'mocha'
-SITE = Depot::Depot.new
-at_exit {SITE.close}
-
Spec::Runner.configure do |config|
config.mock_with :mocha
- config.include SITE.methods
config.before do
- @site = SITE
- @browser = @site.browser
+ SITE.initialize_context!(self)
end
end
View
9 watircraft/lib/steps/world.rb
@@ -3,13 +3,10 @@
# upgrade to newer versions of watircraft.
require 'spec'
+require 'cucumber'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..')
-require 'initialize'
-require 'depot'
-
-SITE = Depot::Depot.new
-at_exit {SITE.close}
+require 'site_start'
World do
- SITE
+ START
end
View
1  watircraft/rakefile
@@ -1,4 +1,3 @@
-#Generated at Tue Feb 03 20:42:54 +0000 2009
require 'rubygems'
require 'taza/tasks'
View
5 watircraft/script/console
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+requires = %w(irb/completion watir/irb-history site_start)
+puts "Type 'irb START' at the prompt."
+exec "irb.bat -I #{APP_ROOT}/lib -r #{requires.join " -r "} --simple-prompt --readline"
View
1  watircraft/script/console.cmd
@@ -0,0 +1 @@
+@ruby script/console %*
View
1  watircraft/test/specs/spec_helper.rb
@@ -5,7 +5,6 @@
require 'rubygems'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib/')
-require 'initialize'
require 'spec_initialize'
Please sign in to comment.
Something went wrong with that request. Please try again.