Commit 5b787f6f authored by Stefano Rivera's avatar Stefano Rivera

Imported Upstream version 1.4.3

parent e2bec5da
rvm:
- 1.9.3
- 2.0.0
- 2.2.1
# whitelist
branches:
......@@ -9,6 +10,7 @@ branches:
gemfile:
- gemfiles/capybara_1_1.gemfile
- gemfiles/rails_4_2.gemfile
- gemfiles/rails_4_1.gemfile
- gemfiles/rails_4_0.gemfile
- gemfiles/rails_3_2.gemfile
......@@ -24,6 +26,19 @@ matrix:
- rvm: 2.0.0
gemfile: gemfiles/rails_3_0.gemfile
- rvm: 2.2.1
gemfile: gemfiles/capybara_1_1.gemfile
- rvm: 2.2.1
gemfile: gemfiles/rails_4_0.gemfile
- rvm: 2.2.1
gemfile: gemfiles/rails_3_2.gemfile
- rvm: 2.2.1
gemfile: gemfiles/rails_3_1.gemfile
- rvm: 2.2.1
gemfile: gemfiles/rails_3_0.gemfile
before_install: gem update --remote bundler
# Needed for selenium browser
before_script:
- "export DISPLAY=:99.0"
......@@ -32,5 +47,3 @@ before_script:
notifications:
email:
- cukes-devs@googlegroups.com
irc:
- "irc.freenode.org#cucumber"
......@@ -76,3 +76,17 @@ appraise "rails_4_1" do
gem "sqlite3", "~> 1.3.7"
gem "database_cleaner", "~> 1.0.1"
end
appraise "rails_4_2" do
gem "rails", "~> 4.2.1"
gem "railties", "~> 4.2.1"
gem "capybara", "~> 2.4.4"
gem "selenium-webdriver", "~> 2.0"
gem "rspec-rails", "~> 3.1.0"
gem "sass-rails", "~> 5.0"
gem "coffee-rails", "~> 4.1.0"
gem "jquery-rails"
gem "uglifier", "~> 2.1.0"
gem "sqlite3", "~> 1.3.7"
gem "database_cleaner", "~> 1.0.1"
end
## [master](https://github.com/cucumber/cucumber-rails/compare/1.4.2...master) (Not yet released)
* Added gem version badge (Kosmas Chatzimichalis)
* Fix a failing test due to rails date selectors only showing 5 years into the past by default ( [#293] (https://github.com/cucumber/cucumber-rails/pull/293) Thomas Walpole )
* Allow cucumber 2 ( [#293] (https://github.com/cucumber/cucumber-rails/pull/293) Thomas Walpole )
* Add rails 4.2 to test matrix ( [#293] (https://github.com/cucumber/cucumber-rails/pull/293) Thomas Walpole )
* Depend on railties instead of rails ( [#294] (https://github.com/cucumber/cucumber-rails/pull/294) Alexander Lang )
* Fix failing Travis CI tests ( [#305] (https://github.com/cucumber/cucumber-rails/pull/305) Matijs van Zuijlen )
* Allow any cucumber < 3 ( [#306] (https://github.com/cucumber/cucumber-rails/pull/306) Matijs van Zuijlen )
* Add annotations configuration in generator ( [#292] (https://github.com/cucumber/cucumber-rails/pull/292) Bob Showalter )
* Expand support to include mime-types 3 ( [#304] (https://github.com/cucumber/cucumber-rails/pull/304) Austin Ziegler )
* Replace badges with SVG versions ( [#307] (https://github.com/cucumber/cucumber-rails/pull/307) Kevin Goslar )
* Add new line to end of generated database.yml ( [#302] (https://github.com/cucumber/cucumber-rails/pull/302) Kevin Carmody)
## [v1.4.2](https://github.com/cucumber/cucumber-rails/compare/1.4.1...v1.4.2) (2014-10-09)
* Updated appraisal dependencies to rspec-rails 3.1.0, gemspec dependency to rspec <= 3.1, and removed turn from rails_4_1 appraisal (Kosmas Chatzimichalis)
......
# Cucumber-Rails
[![Build Status](https://secure.travis-ci.org/cucumber/cucumber-rails.png?branch=master)](http://travis-ci.org/cucumber/cucumber-rails)
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.png)](https://codeclimate.com/github/cucumber/cucumber-rails)
[![Gem Version](https://badge.fury.io/rb/cucumber-rails.svg)](http://badge.fury.io/rb/cucumber-rails)
[![Build Status](https://secure.travis-ci.org/cucumber/cucumber-rails.svg?branch=master)](http://travis-ci.org/cucumber/cucumber-rails)
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails)
[![Dependency Status](https://gemnasium.com/Kosmas/cucumber-rails.svg)](https://gemnasium.com/Kosmas/cucumber-rails)
[![PullReview stats](https://www.pullreview.com/github/cucumber/cucumber-rails/badges/master.svg?)](https://www.pullreview.com/github/cucumber/cucumber-rails/reviews/master)
......
......@@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = 'cucumber-rails'
s.version = '1.4.2'
s.version = '1.4.3'
s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
s.description = "Cucumber Generator and Runtime for Rails"
s.summary = "#{s.name}-#{s.version}"
......@@ -13,21 +13,23 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.add_runtime_dependency('capybara', ['>= 1.1.2', '< 3'])
s.add_runtime_dependency('cucumber', ['>= 1.3.8', '< 2'])
s.add_runtime_dependency('cucumber', ['>= 1.3.8', '< 3'])
s.add_runtime_dependency('nokogiri', '~> 1.5')
s.add_runtime_dependency('rails', ['>= 3', '< 5'])
s.add_runtime_dependency('mime-types', ['>= 1.16', '< 3'])
s.add_runtime_dependency('railties', ['>= 3', '< 5'])
s.add_runtime_dependency('mime-types', ['>= 1.16', '< 4'])
# Main development dependencies
s.add_development_dependency('ammeter', ['>= 0.2.9', '< 2'])
s.add_development_dependency('ammeter', ['>= 0.2.9', '< 1.1.3'])
s.add_development_dependency('appraisal', '>= 0.5.1')
s.add_development_dependency('aruba', '>= 0.4.11')
s.add_development_dependency('aruba', '~> 0.8.0')
s.add_development_dependency('builder', ['>= 2.1.2', '< 4'])
s.add_development_dependency('bundler', '>= 1.3.5')
s.add_development_dependency('selenium-webdriver', '>= 2.45.0')
s.add_development_dependency('database_cleaner', '>= 0.7.2')
s.add_development_dependency('factory_girl', '>= 3.2')
s.add_development_dependency('rake', '>= 0.9.2.2')
s.add_development_dependency('rspec', '>= 2.2', '<= 3.1')
s.add_development_dependency('rails')
# For Documentation:
s.add_development_dependency('bcat', '>= 0.6.2')
......
......@@ -33,7 +33,7 @@ Feature: Allow Cucumber to rescue exceptions
"""
And I run `bundle exec rake db:migrate`
And I run `bundle exec cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
1 step (1 passed)
......
@requires-rails-version-42
Feature: Annotations
I order to track my development progress
As a developer
I should be able to list annotations in my features
Background:
Given I have created a new Rails app "test-app" with no database and installed cucumber-rails
And I write to "features/tests.feature" with:
"""
Feature: Tests
Scenario: Tests
# TODO: When I go to the products page
"""
Scenario: See annotations in .feature file
When I run `bundle exec rake notes`
Then it should pass with:
"""
features/tests.feature:
* [ 3] [TODO] When I go to the products page
"""
......@@ -27,15 +27,15 @@ Feature: Capybara Javascript Drivers
Scenario: Constitution on May 17
Given I am on the new appointment page
And I fill in "Norway's constitution" for "Name"
And I select "2009-02-20 15:10:00 UTC" as the "When" date and time
And I select "2015-02-20 15:10:00 UTC" as the "When" date and time
And I press "Create Appointment"
Then I should see "Norway's constitution"
And I should see "2009-02-20 15:10:00 UTC"
And I should see "2015-02-20 15:10:00 UTC"
"""
When I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
6 steps (6 passed)
......@@ -65,7 +65,7 @@ Feature: Capybara Javascript Drivers
When I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
3 steps (3 passed)
......
......@@ -69,7 +69,7 @@ Feature: Choose javascript database strategy
end
"""
When I run the cukes
Then it should pass with:
Then the feature run should pass with:
"""
3 scenarios (3 passed)
10 steps (10 passed)
......@@ -105,7 +105,7 @@ Feature: Choose javascript database strategy
end
"""
When I run the cukes
Then it should pass with:
Then the feature run should pass with:
"""
2 scenarios (2 passed)
5 steps (5 passed)
......@@ -137,7 +137,7 @@ Feature: Choose javascript database strategy
end
"""
When I run the cukes
Then it should pass with:
Then the feature run should pass with:
"""
2 scenarios (2 passed)
3 steps (3 passed)
......
......@@ -37,7 +37,7 @@ Feature: DatabaseCleaner
"""
And I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
2 scenarios (2 passed)
6 steps (6 passed)
......
......@@ -48,7 +48,7 @@ Feature: Disable automatic database cleaning
"""
And I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
2 scenarios (2 passed)
4 steps (4 passed)
......
......@@ -28,7 +28,7 @@ Feature: Emulate Javascript
"""
When I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
3 steps (3 passed)
......@@ -85,7 +85,7 @@ Feature: Emulate Javascript
"""
When I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
8 steps (8 passed)
......
......@@ -29,7 +29,7 @@ Feature: Rerun profile
end
"""
When I successfully run `bundle exec cucumber -p rerun`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
1 step (1 passed)
......
......@@ -40,7 +40,7 @@ Feature: REST API
"""
And I run `bundle exec rake db:migrate`
And I run `bundle exec rake cucumber`
Then it should pass with:
Then the feature run should pass with:
"""
1 scenario (1 passed)
2 steps (2 passed)
......
module CucumberRailsHelper
def rails_new(options = {})
options[:name] ||= 'test_app'
run_simple "bundle exec rails new #{options[:name]} --skip-test-unit --skip-spring #{options[:args]}"
assert_passing_with('README')
command = run "bundle exec rails new #{options[:name]} --skip-test-unit --skip-spring #{options[:args]}"
assert_partial_output('README', all_output)
assert_success(true)
cd options[:name]
set_environment_variable 'BUNDLE_GEMFILE', 'Gemfile'
end
def install_cucumber_rails(*options)
......@@ -81,3 +83,11 @@ end
When /^I run the cukes$/ do
run_simple('bundle exec cucumber')
end
# Copied from Aruba
Then /^the feature run should pass with:$/ do |string|
step 'the output should not contain " failed)"'
step 'the output should not contain " undefined)"'
step 'the exit status should be 0'
step 'the output should contain:', string
end
Aruba.configure do |config|
config.exit_timeout = 120
end
......@@ -4,11 +4,6 @@ require 'bundler/setup'
require 'rspec/expectations'
require 'aruba/cucumber'
Before do
@aruba_timeout_seconds = 120 # A long time needed some times
unset_bundler_env_vars
end
if(ENV['ARUBA_REPORT_DIR'])
# Override reporting behaviour so we don't document all files, only the ones
# that have been created after @aruba_report_start (a Time object). This is
......
module VersionHooksHelper
def rails_version
@rails_version ||= `bundle exec rails --version`.match(/[\d.]+$/).to_s
end
end
Before '@requires-rails-version-42' do
extend VersionHooksHelper
if Gem::Version.new(rails_version) < Gem::Version.new('4.2')
skip_this_scenario
end
end
# This file was generated by Appraisal
source "https://rubygems.org"
gem "rails", "~> 4.2.1"
gem "railties", "~> 4.2.1"
gem "capybara", "~> 2.4.4"
gem "selenium-webdriver", "~> 2.0"
gem "rspec-rails", "~> 3.1.0"
gem "sass-rails", "~> 5.0"
gem "coffee-rails", "~> 4.1.0"
gem "jquery-rails"
gem "uglifier", "~> 2.1.0"
gem "sqlite3", "~> 1.3.7"
gem "database_cleaner", "~> 1.0.1"
gemspec :path => "../"
......@@ -41,7 +41,7 @@ module Cucumber
return unless File.exist?('config/database.yml')
unless File.read('config/database.yml').include? 'cucumber:'
gsub_file 'config/database.yml', /^test:.*\n/, "test: &test\n"
gsub_file 'config/database.yml', /\z/, "\ncucumber:\n <<: *test"
gsub_file 'config/database.yml', /\z/, "\ncucumber:\n <<: *test\n"
# Since gsub_file doesn't ask the user, just inform user that the file was overwritten.
puts ' force config/database.yml'
......
......@@ -35,6 +35,15 @@ begin
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
end
task :annotations_setup do
Rails.application.configure do
if config.respond_to?(:annotations)
config.annotations.directories << 'features'
config.annotations.register_extensions('feature') { |tag| /#\s*(#{tag}):?\s*(.*)$/ }
end
end
end
end
desc 'Alias for cucumber:ok'
task :cucumber => 'cucumber:ok'
......@@ -50,6 +59,8 @@ begin
end
task :stats => 'cucumber:statsetup'
task :notes => 'cucumber:annotations_setup'
rescue LoadError
desc 'cucumber rake task not available (cucumber not installed)'
task :cucumber do
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment