Permalink
Browse files

upgrading to capybara 2.0.2

using sh instead of system in Rakefile and failing if a command fails
updating browser_steps.rb for syntax changes in childprocess 0.3.7
  • Loading branch information...
1 parent 109dee6 commit 4637b6dc4829f9530adca7cfaeff1b3b9e26a7e8 @klieber klieber committed Feb 8, 2013
Showing with 30 additions and 23 deletions.
  1. +1 −1 Gemfile
  2. +12 −14 Gemfile.lock
  3. +13 −5 Rakefile
  4. +4 −3 features/step_definitions/browser_steps.rb
View
@@ -4,7 +4,7 @@ gem 'cucumber'
gem 'rspec'
gem 'nokogiri'
gem 'relish'
-gem 'capybara'
+gem 'capybara', '~> 2.0.2'
gem 'rake'
#gem 'ruby-debug19'
View
@@ -1,17 +1,16 @@
GEM
remote: http://rubygems.org/
specs:
- addressable (2.3.2)
archive-tar-minitar (0.5.2)
builder (3.0.0)
- capybara (1.1.2)
+ capybara (2.0.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
- xpath (~> 0.1.4)
- childprocess (0.3.4)
+ xpath (~> 1.0.0)
+ childprocess (0.3.7)
ffi (~> 1.0, >= 1.0.6)
cucumber (1.1.4)
builder (>= 2.1.2)
@@ -20,17 +19,15 @@ GEM
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
diff-lcs (1.1.3)
- ffi (1.1.2)
+ ffi (1.3.1)
gherkin (2.7.2)
json (>= 1.4.6)
json (1.6.4)
- libwebsocket (0.1.5)
- addressable
mime-types (1.17.2)
- multi_json (1.3.6)
+ multi_json (1.5.0)
nokogiri (1.5.0)
- rack (1.4.1)
- rack-test (0.6.1)
+ rack (1.5.2)
+ rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.3)
relish (0.5.3)
@@ -48,20 +45,21 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
rubyzip (0.9.9)
- selenium-webdriver (2.25.0)
+ selenium-webdriver (2.29.0)
childprocess (>= 0.2.5)
- libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
+ websocket (~> 1.0.4)
term-ansicolor (1.0.7)
- xpath (0.1.4)
+ websocket (1.0.7)
+ xpath (1.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
- capybara
+ capybara (~> 2.0.2)
cucumber
nokogiri
rake
View
@@ -1,17 +1,25 @@
task :default => [:install]
task :install do
- system "mvn clean install"
+ sh "mvn clean install" do |ok, res|
+ ok or fail "Failed to install with status #{res.exitstatus}"
+ end
end
task :cucumber => [:install] do
- system "bundle exec cucumber"
+ sh "bundle exec cucumber" do |ok, res|
+ ok or fail "Failed to execute all feature tests with status #{res.exitstatus}"
+ end
end
task :relish => [:cucumber] do
- system "bundle exec relish push searls/jasmine-maven-plugin"
+ sh "bundle exec relish push searls/jasmine-maven-plugin" do |ok, res|
+ ok or fail "Failed to push to relish with status #{res.exitstatus}"
+ end
end
task :deploy => [:install, :cucumber] do
- system "mvn deploy"
-end
+ sh "mvn deploy" do |ok, res|
+ ok or fail "Failed to deploy with status #{res.exitstatus}"
+ end
+end
@@ -1,8 +1,8 @@
When /^I run "([^"]*)" in a new process$/ do |command|
- @process = ChildProcess.build command
+ @process = ChildProcess.send(:build,*command.split(' '))
@process.start
- sleep 3
+ sleep 10
end
@@ -17,4 +17,5 @@
Then /page should contain "([^"]*)"$/ do |expected|
page.should have_content(expected)
-end
+end
+

0 comments on commit 4637b6d

Please sign in to comment.