Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a feature for cucumber integration

  • Loading branch information...
commit 50775ab787d6dff75ee64d6b8323ab7851ce7d26 1 parent 2adf7c6
@jnicklas authored
View
15 Gemfile.lock
@@ -20,10 +20,17 @@ PATH
GEM
remote: http://rubygems.org/
specs:
+ builder (3.0.0)
celerity (0.8.7)
childprocess (0.1.6)
ffi (~> 0.6.3)
configuration (1.2.0)
+ cucumber (0.10.0)
+ builder (>= 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.3.2)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
culerity (0.2.15)
diff-lcs (1.1.2)
ffi (0.6.3)
@@ -33,6 +40,12 @@ GEM
rspec (~> 2.0)
rspec-instafail (~> 0.1.4)
ruby-progressbar (~> 0.0.9)
+ gherkin (2.3.3)
+ json (~> 1.4.6)
+ gherkin (2.3.3-java)
+ json (~> 1.4.6)
+ json (1.4.6)
+ json (1.4.6-java)
json_pure (1.4.6)
launchy (0.3.7)
configuration (>= 0.0.5)
@@ -64,6 +77,7 @@ GEM
sinatra (1.1.2)
rack (~> 1.1)
tilt (~> 1.2)
+ term-ansicolor (1.0.5)
tilt (1.2.2)
weakling (0.0.4-java)
yard (0.6.4)
@@ -76,6 +90,7 @@ DEPENDENCIES
bundler (~> 1.0)
capybara!
celerity (>= 0.7.9)
+ cucumber (>= 0.10)
culerity (>= 0.2.4)
fuubar (>= 0.0.1)
launchy (>= 0.3.5)
View
1  capybara.gemspec
@@ -36,4 +36,5 @@ Gem::Specification.new do |s|
s.add_development_dependency("launchy", [">= 0.3.5"])
s.add_development_dependency("yard", [">= 0.5.8"])
s.add_development_dependency("fuubar", [">= 0.0.1"])
+ s.add_development_dependency("cucumber", [">= 0.10"])
end
View
18 features/capybara.feature
@@ -0,0 +1,18 @@
+Feature: Capybara's cucumber integration
+ In order to integrate with the lovely plain text testing framework
+ As Capybara
+ I want to integrate successfully with Cucumber
+
+ Scenario: hello world
+ When I visit the root page
+ Then I should see "Hello world!"
+
+ @javascript
+ Scenario: javascript tag
+ When I visit the root page
+ Then Capybara should use the "selenium" driver
+
+ @selenium
+ Scenario: selenium tag
+ When I visit the root page
+ Then Capybara should use the "selenium" driver
View
11 features/step_definitions/capybara_steps.rb
@@ -0,0 +1,11 @@
+When /^I visit the root page$/ do
+ visit('/')
+end
+
+Then /^I should see "([^"]*)"$/ do |text|
+ page.should have_content(text)
+end
+
+Then /^Capybara should use the "([^"]*)" driver$/ do |driver|
+ Capybara.current_driver.should == driver.to_sym
+end
View
7 features/support/env.rb
@@ -0,0 +1,7 @@
+require 'rubygems'
+require 'bundler/setup'
+
+require 'capybara/cucumber'
+require 'capybara/spec/test_app'
+
+Capybara.app = TestApp
Please sign in to comment.
Something went wrong with that request. Please try again.