cucumber 0.4.0.rc1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +1 -1
- data/Manifest.txt +3 -0
- data/examples/sinatra/features/support/env.rb +0 -2
- data/examples/watir/README.textile +2 -2
- data/examples/webrat/features/search.feature +12 -0
- data/examples/webrat/features/step_definitions/kvasir_steps.rb +14 -0
- data/examples/webrat/features/support/env.rb +17 -0
- data/lib/cucumber/py_support/py_language.rb +1 -1
- data/lib/cucumber/rb_support/rb_language.rb +1 -1
- data/lib/cucumber/version.rb +1 -1
- data/spec/cucumber/formatter/junit_spec.rb +24 -1
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +3 -3
- metadata +8 -5
data/History.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
== 0.4.0 2009-10-
|
1
|
+
== 0.4.0 2009-10-09
|
2
2
|
|
3
3
|
The back to stable release. When we went from 0.3.11 to 0.3.90 we thought we were close to a 0.4.0 release. Then the community
|
4
4
|
went nuts and a lot of great contributions came in. Some of those broke backwards compatibility, and we decided it would be
|
data/Manifest.txt
CHANGED
@@ -277,6 +277,9 @@ examples/watir/Rakefile
|
|
277
277
|
examples/watir/features/search.feature
|
278
278
|
examples/watir/features/step_definitons/search_steps.rb
|
279
279
|
examples/watir/features/support/env.rb
|
280
|
+
examples/webrat/features/search.feature
|
281
|
+
examples/webrat/features/step_definitions/kvasir_steps.rb
|
282
|
+
examples/webrat/features/support/env.rb
|
280
283
|
features/background.feature
|
281
284
|
features/bug_371.feature
|
282
285
|
features/bug_475.feature
|
@@ -4,7 +4,7 @@ work with all of them.
|
|
4
4
|
|
5
5
|
Just run with:
|
6
6
|
|
7
|
-
rake
|
7
|
+
rake cucumber
|
8
8
|
|
9
9
|
This will use Watir/IE if you're on Windows, and SafariWatir/Safari if you're on OS X.
|
10
10
|
You can force the use of FireWatir/Firefox on any platform like this:
|
@@ -13,4 +13,4 @@ You can force the use of FireWatir/Firefox on any platform like this:
|
|
13
13
|
|
14
14
|
And finally, you can use Celerity by running in JRuby:
|
15
15
|
|
16
|
-
jruby -S rake
|
16
|
+
jruby -S rake cucumber
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Search
|
2
|
+
In order to learn more
|
3
|
+
As an information seeker
|
4
|
+
I want to find more information
|
5
|
+
|
6
|
+
Scenario: Find what I'm looking for
|
7
|
+
Given I am on the Kvasir search page
|
8
|
+
When I search for "cucumber github"
|
9
|
+
Then I should see
|
10
|
+
"""
|
11
|
+
BDD that talks to domain experts first and code second
|
12
|
+
"""
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Google is too hard to script with Mechanize
|
2
|
+
# Using a Norewgian search engine instead :-)
|
3
|
+
Given /^I am on the Kvasir search page$/ do
|
4
|
+
visit('http://www.kvasir.no/')
|
5
|
+
end
|
6
|
+
|
7
|
+
When /^I search for "([^\"]*)"$/ do |query|
|
8
|
+
fill_in('q', :with => query)
|
9
|
+
click_button('sokeKnapp')
|
10
|
+
end
|
11
|
+
|
12
|
+
Then /^I should see$/ do |text|
|
13
|
+
response_body.should contain(text)
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'webrat'
|
2
|
+
require 'spec'
|
3
|
+
|
4
|
+
Webrat.configure do |config|
|
5
|
+
config.mode = :mechanize
|
6
|
+
end
|
7
|
+
|
8
|
+
class WebratWorld
|
9
|
+
include Spec::Matchers
|
10
|
+
include Webrat::Methods
|
11
|
+
include Webrat::Matchers
|
12
|
+
end
|
13
|
+
|
14
|
+
World do
|
15
|
+
WebratWorld.new
|
16
|
+
end
|
17
|
+
|
@@ -67,7 +67,7 @@ module Cucumber
|
|
67
67
|
@regexp_argument_matcher.arguments_from(regexp, step_name)
|
68
68
|
end
|
69
69
|
|
70
|
-
def snippet_text(step_keyword, step_name, multiline_arg_class
|
70
|
+
def snippet_text(step_keyword, step_name, multiline_arg_class)
|
71
71
|
escaped = Regexp.escape(step_name).gsub('\ ', ' ').gsub('/', '\/')
|
72
72
|
escaped = escaped.gsub(PARAM_PATTERN, ESCAPED_PARAM_PATTERN)
|
73
73
|
|
data/lib/cucumber/version.rb
CHANGED
@@ -67,7 +67,30 @@ module Cucumber::Formatter
|
|
67
67
|
it { @doc.to_s.should_not =~ /Things/ }
|
68
68
|
it { @doc.to_s.should_not =~ /Good|Evil/ }
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
|
+
describe "with a regular data table scenario" do
|
72
|
+
define_steps do
|
73
|
+
Given(/the following items on a shortlist/) { |table| }
|
74
|
+
When(/I go.*/) { }
|
75
|
+
Then(/I should have visited at least/) { |table| }
|
76
|
+
end
|
77
|
+
|
78
|
+
define_feature <<-FEATURE
|
79
|
+
Feature: Shortlist
|
71
80
|
|
81
|
+
Scenario: Procure items
|
82
|
+
Given the following items on a shortlist:
|
83
|
+
| item |
|
84
|
+
| milk |
|
85
|
+
| cookies |
|
86
|
+
When I get some..
|
87
|
+
Then I'll eat 'em
|
88
|
+
|
89
|
+
FEATURE
|
90
|
+
# these type of tables shouldn't crash (or generate test cases)
|
91
|
+
it { @doc.to_s.should_not =~ /milk/ }
|
92
|
+
it { @doc.to_s.should_not =~ /cookies/ }
|
93
|
+
end
|
94
|
+
end
|
72
95
|
end
|
73
96
|
end
|
@@ -87,7 +87,7 @@ module Cucumber
|
|
87
87
|
end
|
88
88
|
|
89
89
|
it "should recognise quotes in name and make according regexp" do
|
90
|
-
@rb.snippet_text('Given', 'A "first" arg').should == unindented(%{
|
90
|
+
@rb.snippet_text('Given', 'A "first" arg', nil).should == unindented(%{
|
91
91
|
Given /^A "([^\\"]*)" arg$/ do |arg1|
|
92
92
|
pending
|
93
93
|
end
|
@@ -95,7 +95,7 @@ module Cucumber
|
|
95
95
|
end
|
96
96
|
|
97
97
|
it "should recognise several quoted words in name and make according regexp and args" do
|
98
|
-
@rb.snippet_text('Given', 'A "first" and "second" arg').should == unindented(%{
|
98
|
+
@rb.snippet_text('Given', 'A "first" and "second" arg', nil).should == unindented(%{
|
99
99
|
Given /^A "([^\\"]*)" and "([^\\"]*)" arg$/ do |arg1, arg2|
|
100
100
|
pending
|
101
101
|
end
|
@@ -103,7 +103,7 @@ module Cucumber
|
|
103
103
|
end
|
104
104
|
|
105
105
|
it "should not use quote group when there are no quotes" do
|
106
|
-
@rb.snippet_text('Given', 'A first arg').should == unindented(%{
|
106
|
+
@rb.snippet_text('Given', 'A first arg', nil).should == unindented(%{
|
107
107
|
Given /^A first arg$/ do
|
108
108
|
pending
|
109
109
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-09 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -355,6 +355,9 @@ files:
|
|
355
355
|
- examples/watir/features/search.feature
|
356
356
|
- examples/watir/features/step_definitons/search_steps.rb
|
357
357
|
- examples/watir/features/support/env.rb
|
358
|
+
- examples/webrat/features/search.feature
|
359
|
+
- examples/webrat/features/step_definitions/kvasir_steps.rb
|
360
|
+
- examples/webrat/features/support/env.rb
|
358
361
|
- features/background.feature
|
359
362
|
- features/bug_371.feature
|
360
363
|
- features/bug_475.feature
|
@@ -566,7 +569,7 @@ licenses: []
|
|
566
569
|
|
567
570
|
post_install_message: |
|
568
571
|
*******************************************************************************
|
569
|
-
Thank you for installing cucumber-0.4.0
|
572
|
+
Thank you for installing cucumber-0.4.0
|
570
573
|
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
|
571
574
|
for important information about this release.
|
572
575
|
*******************************************************************************
|
@@ -584,9 +587,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
584
587
|
version:
|
585
588
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
586
589
|
requirements:
|
587
|
-
- - "
|
590
|
+
- - ">="
|
588
591
|
- !ruby/object:Gem::Version
|
589
|
-
version:
|
592
|
+
version: "0"
|
590
593
|
version:
|
591
594
|
requirements: []
|
592
595
|
|