kosmas58-cucumber 0.2.3.3 → 0.3.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +203 -3
- data/Manifest.txt +0 -346
- data/README.txt +0 -21
- data/Rakefile +3 -1
- data/bin/cucumber +12 -1
- data/config/hoe.rb +6 -5
- data/cucumber.yml +3 -1
- data/examples/cs/Rakefile +1 -1
- data/examples/cs/features/addition.feature +5 -5
- data/examples/cs/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/dos_line_endings/Rakefile +1 -1
- data/examples/dos_line_endings/features/dos_line_endings.feature +9 -9
- data/examples/i18n/Rakefile +1 -1
- data/examples/i18n/ar/Rakefile +1 -1
- data/examples/i18n/bg/Rakefile +6 -0
- data/examples/i18n/bg/features/addition.feature +11 -0
- data/examples/i18n/bg/features/consecutive_calculations.feature +18 -0
- data/examples/i18n/bg/features/division.feature +16 -0
- data/examples/i18n/bg/features/step_definitons/calculator_steps.rb +24 -0
- data/examples/i18n/bg/features/support/env.rb +6 -0
- data/examples/i18n/bg/features/support/world.rb +8 -0
- data/examples/i18n/bg/lib/calculator.rb +24 -0
- data/examples/i18n/cat/Rakefile +6 -0
- data/examples/i18n/cat/features/step_definitons/calculator_steps.rb +21 -0
- data/examples/i18n/cat/features/suma.feature +16 -0
- data/examples/i18n/cat/lib/calculadora.rb +16 -0
- data/examples/i18n/da/Rakefile +1 -1
- data/examples/i18n/de/Rakefile +1 -1
- data/examples/i18n/en/Rakefile +1 -1
- data/examples/i18n/en-lol/Rakefile +1 -1
- data/examples/i18n/es/Rakefile +1 -1
- data/examples/i18n/et/Rakefile +1 -1
- data/examples/i18n/fi/Rakefile +1 -1
- data/examples/i18n/fr/Rakefile +1 -1
- data/examples/i18n/fr/features/addition.feature +4 -4
- data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +1 -1
- data/examples/i18n/fr/lib/calculatrice.rb +1 -1
- data/examples/i18n/he/Rakefile +6 -0
- data/examples/i18n/he/features/addition.feature +16 -0
- data/examples/i18n/he/features/division.feature +9 -0
- data/examples/i18n/he/features/step_definitons/calculator_steps.rb +24 -0
- data/examples/i18n/he/lib/calculator.rb +14 -0
- data/examples/i18n/hu/Rakefile +6 -0
- data/examples/i18n/hu/features/addition.feature +16 -0
- data/examples/i18n/hu/features/division.feature +9 -0
- data/examples/i18n/hu/features/step_definitons/calculator_steps.rb +25 -0
- data/examples/i18n/hu/lib/calculator.rb +14 -0
- data/examples/i18n/id/Rakefile +1 -1
- data/examples/i18n/it/Rakefile +1 -1
- data/examples/i18n/ja/Rakefile +1 -1
- data/examples/i18n/ja/features/addition.feature +1 -1
- data/examples/i18n/ja/features/division.feature +1 -1
- data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/ko/Rakefile +1 -1
- data/examples/i18n/lt/Rakefile +1 -1
- data/examples/i18n/lt/features/addition.feature +2 -3
- data/examples/i18n/lv/Rakefile +6 -0
- data/examples/i18n/lv/features/addition.feature +16 -0
- data/examples/i18n/lv/features/division.feature +9 -0
- data/examples/i18n/lv/features/step_definitons/calculator_steps.rb +24 -0
- data/examples/i18n/lv/lib/calculator.rb +14 -0
- data/examples/i18n/no/Rakefile +1 -1
- data/examples/i18n/pl/Rakefile +6 -0
- data/examples/i18n/pl/features/addition.feature +16 -0
- data/examples/i18n/pl/features/division.feature +9 -0
- data/examples/i18n/pl/features/step_definitons/calculator_steps.rb +24 -0
- data/examples/i18n/pl/features/support/env.rb +6 -0
- data/examples/i18n/pl/lib/calculator.rb +14 -0
- data/examples/i18n/pt/Rakefile +1 -1
- data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +3 -7
- data/examples/i18n/pt/features/support/env.rb +6 -0
- data/examples/i18n/ro/Rakefile +1 -1
- data/examples/i18n/ru/Rakefile +1 -1
- data/examples/i18n/se/Rakefile +1 -1
- data/examples/i18n/sk/Rakefile +1 -1
- data/examples/i18n/zh-CN/Rakefile +1 -1
- data/examples/i18n/zh-TW/Rakefile +1 -1
- data/examples/java/README.textile +2 -6
- data/examples/java/build.xml +33 -0
- data/examples/java/features/step_definitons/hello_steps.rb +0 -2
- data/examples/junit/features/one_passing_one_failing.feature +8 -0
- data/examples/junit/features/pending.feature +5 -0
- data/examples/junit/features/step_definitions/steps.rb +11 -0
- data/examples/selenium/Rakefile +1 -1
- data/examples/selenium_webrat/Rakefile +1 -1
- data/examples/selenium_webrat/config.ru +0 -0
- data/examples/selenium_webrat/features/search.feature +1 -1
- data/examples/selenium_webrat/features/step_definitons/search_steps.rb +2 -2
- data/examples/selenium_webrat/features/support/env.rb +7 -3
- data/examples/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
- data/examples/self_test/features/background/failing_background.feature +1 -0
- data/examples/self_test/features/background/passing_background.feature +2 -2
- data/examples/self_test/features/multiline_name.feature +27 -0
- data/examples/self_test/features/sample.feature +2 -0
- data/examples/self_test/features/search_sample.feature +32 -0
- data/examples/self_test/features/step_definitions/sample_steps.rb +11 -0
- data/examples/self_test/features/support/env.rb +17 -1
- data/examples/sinatra/Rakefile +1 -1
- data/examples/test_unit/Rakefile +1 -1
- data/examples/tickets/Rakefile +3 -3
- data/examples/tickets/features/229/tagged_hooks.feature +8 -0
- data/examples/tickets/features/229/tagged_hooks.rb +14 -0
- data/examples/tickets/features/236.feature +9 -9
- data/examples/tickets/features/272/hooks.feature +26 -0
- data/examples/tickets/features/272/hooks_steps.rb +53 -0
- data/examples/tickets/features/279/py_string_indent.feature +25 -0
- data/examples/tickets/features/279/py_string_indent.steps.rb +12 -0
- data/examples/tickets/features/279/wrong.feature_ +11 -0
- data/examples/tickets/features/301/filter_background_tagged_hooks.feature +6 -0
- data/examples/tickets/features/301/filter_background_tagged_hooks_steps.rb +12 -0
- data/examples/tickets/features/306/only_background.feature +4 -0
- data/examples/tickets/features/step_definitons/tickets_steps.rb +0 -7
- data/examples/watir/Rakefile +1 -1
- data/examples/watir/features/search.feature +4 -1
- data/examples/watir/features/step_definitons/search_steps.rb +2 -4
- data/features/after_block_exceptions.feature +99 -0
- data/features/after_step_block_exceptions.feature +101 -0
- data/features/background.feature +105 -38
- data/features/cucumber_cli.feature +201 -64
- data/features/cucumber_cli_diff_disabled.feature +6 -4
- data/features/cucumber_cli_outlines.feature +60 -35
- data/features/custom_formatter.feature +3 -3
- data/features/exclude_files.feature +20 -0
- data/features/expand.feature +48 -0
- data/features/html_formatter/a.html +1632 -0
- data/features/html_formatter.feature +7 -0
- data/features/junit_formatter.feature +62 -0
- data/features/multiline_names.feature +43 -0
- data/features/rake_task.feature +150 -0
- data/features/report_called_undefined_steps.feature +4 -3
- data/features/snippet.feature +2 -3
- data/features/step_definitions/cucumber_steps.rb +98 -15
- data/features/support/env.rb +78 -3
- data/features/usage.feature +32 -19
- data/features/work_in_progress.feature +148 -0
- data/gem_tasks/deployment.rake +1 -1
- data/gem_tasks/rspec.rake +9 -2
- data/lib/cucumber/ast/background.rb +19 -7
- data/lib/cucumber/ast/comment.rb +4 -0
- data/lib/cucumber/ast/feature.rb +7 -1
- data/lib/cucumber/ast/feature_element.rb +24 -9
- data/lib/cucumber/ast/features.rb +4 -0
- data/lib/cucumber/ast/outline_table.rb +74 -4
- data/lib/cucumber/ast/py_string.rb +5 -1
- data/lib/cucumber/ast/scenario.rb +31 -7
- data/lib/cucumber/ast/scenario_outline.rb +17 -9
- data/lib/cucumber/ast/step.rb +8 -5
- data/lib/cucumber/ast/step_collection.rb +14 -1
- data/lib/cucumber/ast/step_invocation.rb +29 -15
- data/lib/cucumber/ast/table.rb +9 -1
- data/lib/cucumber/ast/tags.rb +9 -1
- data/lib/cucumber/ast/visitor.rb +6 -2
- data/lib/cucumber/cli/configuration.rb +134 -105
- data/lib/cucumber/cli/main.rb +35 -12
- data/lib/cucumber/core_ext/proc.rb +9 -13
- data/lib/cucumber/formatter/ansicolor.rb +1 -1
- data/lib/cucumber/formatter/console.rb +36 -14
- data/lib/cucumber/formatter/cucumber.css +31 -12
- data/lib/cucumber/formatter/duration.rb +10 -0
- data/lib/cucumber/formatter/html.rb +76 -16
- data/lib/cucumber/formatter/junit.rb +79 -0
- data/lib/cucumber/formatter/pretty.rb +19 -14
- data/lib/cucumber/formatter/profile.rb +1 -1
- data/lib/cucumber/formatter/progress.rb +12 -12
- data/lib/cucumber/formatter/rerun.rb +1 -0
- data/lib/cucumber/formatter/tag_cloud.rb +28 -0
- data/lib/cucumber/formatter/usage.rb +5 -5
- data/lib/cucumber/formatters/unicode.rb +5 -0
- data/lib/cucumber/languages.yml +111 -34
- data/lib/cucumber/parser/feature.rb +237 -36
- data/lib/cucumber/parser/feature.tt +68 -30
- data/lib/cucumber/parser/treetop_ext.rb +12 -3
- data/lib/cucumber/rails/rspec.rb +5 -3
- data/lib/cucumber/rails/world.rb +29 -4
- data/lib/cucumber/rake/task.rb +125 -37
- data/lib/cucumber/rspec_neuter.rb +23 -0
- data/lib/cucumber/step_definition.rb +5 -2
- data/lib/cucumber/step_match.rb +10 -6
- data/lib/cucumber/step_mother.rb +98 -26
- data/lib/cucumber/version.rb +3 -3
- data/lib/cucumber/world.rb +2 -2
- data/lib/cucumber.rb +7 -2
- data/rails_generators/cucumber/USAGE +0 -3
- data/rails_generators/cucumber/cucumber_generator.rb +51 -44
- data/rails_generators/cucumber/templates/cucumber.rake +5 -5
- data/rails_generators/cucumber/templates/cucumber_environment.rb +23 -0
- data/rails_generators/cucumber/templates/de/paths.rb +27 -0
- data/rails_generators/cucumber/templates/de/webrat_steps.rb +139 -0
- data/rails_generators/cucumber/templates/en/paths.rb +27 -0
- data/rails_generators/cucumber/templates/{webrat_steps.rb → en/webrat_steps.rb} +26 -2
- data/rails_generators/cucumber/templates/env.rb +1 -1
- data/rails_generators/feature/USAGE +0 -3
- data/rails_generators/feature/feature_generator.rb +6 -30
- data/spec/cucumber/ast/feature_element_spec.rb +40 -0
- data/spec/cucumber/ast/py_string_spec.rb +4 -0
- data/spec/cucumber/ast/table_spec.rb +21 -5
- data/spec/cucumber/ast/visitor_spec.rb +27 -0
- data/spec/cucumber/cli/configuration_spec.rb +75 -54
- data/spec/cucumber/cli/main_spec.rb +60 -154
- data/spec/cucumber/formatter/color_io_spec.rb +1 -0
- data/spec/cucumber/formatter/duration_spec.rb +22 -0
- data/spec/cucumber/formatter/progress_spec.rb +36 -0
- data/spec/cucumber/parser/feature_parser_spec.rb +102 -1
- data/spec/cucumber/step_mother_spec.rb +23 -5
- metadata +79 -22
- data/examples/java/Rakefile +0 -12
- data/examples/self_test/features/support/tag_count_formatter.rb +0 -25
- data/lib/cucumber/formatter.rb +0 -1
- data/rails_generators/cucumber/templates/paths.rb +0 -29
- data/spec/cucumber/formatters/profile_formatter_spec.rb +0 -198
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec/expectations'
|
3
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
+
require 'cucumber/formatter/unicode'
|
5
|
+
require 'calculator'
|
6
|
+
|
7
|
+
Before do
|
8
|
+
@calc = Calculator.new
|
9
|
+
end
|
10
|
+
|
11
|
+
After do
|
12
|
+
end
|
13
|
+
|
14
|
+
Given /esmu ievadījis kalkulatorā (\d+)/ do |n|
|
15
|
+
@calc.push n.to_i
|
16
|
+
end
|
17
|
+
|
18
|
+
When /nospiežu pogu (\w+)/ do |op|
|
19
|
+
@result = @calc.send op
|
20
|
+
end
|
21
|
+
|
22
|
+
Then /rezultātam uz ekrāna ir jābūt (.*)/ do |result|
|
23
|
+
@result.should == result.to_f
|
24
|
+
end
|
data/examples/i18n/no/Rakefile
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
Właściwość: Dodawanie
|
2
|
+
W celu uniknięcia głupich błędów
|
3
|
+
Jako matematyczny idiota
|
4
|
+
Chcę sprawdzić wartość sumy dwóch liczb
|
5
|
+
|
6
|
+
Szablon scenariusza: Dodaj dwie liczby
|
7
|
+
Zakładając wprowadzenie do kalkulatora liczby <liczba_1>
|
8
|
+
Oraz wprowadzenie do kalkulatora liczby <liczba_2>
|
9
|
+
Jeżeli nacisnę <przycisk>
|
10
|
+
Wtedy rezultat <wynik> wyświetli się na ekranie
|
11
|
+
|
12
|
+
Przykłady:
|
13
|
+
| liczba_1 | liczba_2 | przycisk | wynik |
|
14
|
+
| 20 | 30 | dodaj | 50 |
|
15
|
+
| 2 | 5 | dodaj | 7 |
|
16
|
+
| 0 | 40 | dodaj | 40 |
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Właściwość: Dzielenie
|
2
|
+
W celu uniknięcia głupich błędów
|
3
|
+
Kasjer musi znać się na ułamkach
|
4
|
+
|
5
|
+
Scenariusz: Zwykłe liczby
|
6
|
+
Zakładając wprowadzenie do kalkulatora liczby 3
|
7
|
+
Oraz wprowadzenie do kalkulatora liczby 2
|
8
|
+
Jeżeli nacisnę podziel
|
9
|
+
Wtedy rezultat 1.5 wyświetli się na ekranie
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec/expectations'
|
3
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
+
require 'cucumber/formatter/unicode'
|
5
|
+
require 'calculator'
|
6
|
+
|
7
|
+
Before do
|
8
|
+
@calc = Calculator.new
|
9
|
+
end
|
10
|
+
|
11
|
+
After do
|
12
|
+
end
|
13
|
+
|
14
|
+
Zakładając /wprowadzenie do kalkulatora liczby (\d+)/ do |n|
|
15
|
+
@calc.push n.to_i
|
16
|
+
end
|
17
|
+
|
18
|
+
Jeżeli /nacisnę (\w+)/ do |op|
|
19
|
+
@result = @calc.send op
|
20
|
+
end
|
21
|
+
|
22
|
+
Wtedy /rezultat (.*) wyświetli się na ekranie/ do |result|
|
23
|
+
@result.should == result.to_f
|
24
|
+
end
|
data/examples/i18n/pt/Rakefile
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
-
require 'cucumber/formatter/unicode'
|
5
|
-
require 'calculadora'
|
6
2
|
|
7
3
|
Before do
|
8
4
|
@calc = Calculadora.new
|
@@ -11,14 +7,14 @@ end
|
|
11
7
|
After do
|
12
8
|
end
|
13
9
|
|
14
|
-
|
10
|
+
Dado /que eu digitei (\d+) na calculadora/ do |n|
|
15
11
|
@calc.push n.to_i
|
16
12
|
end
|
17
13
|
|
18
|
-
|
14
|
+
Quando 'eu aperto o botão de soma' do
|
19
15
|
@result = @calc.soma
|
20
16
|
end
|
21
17
|
|
22
|
-
|
18
|
+
Então /o resultado na calculadora deve ser (\d*)/ do |result|
|
23
19
|
@result.should == result.to_i
|
24
20
|
end
|
data/examples/i18n/ro/Rakefile
CHANGED
data/examples/i18n/ru/Rakefile
CHANGED
data/examples/i18n/se/Rakefile
CHANGED
data/examples/i18n/sk/Rakefile
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
h1. Using Cucumber with Java
|
2
2
|
|
3
3
|
This directory contains code to demonstrate how Cucumber can be used to develop Java code.
|
4
|
-
You need JRuby 1.1.3 or higher installed and JRuby's bin directory on your PATH.
|
5
4
|
|
6
5
|
h2. Installing required gems
|
7
6
|
|
8
|
-
jruby -S gem install
|
7
|
+
jruby -S gem install cucumber
|
9
8
|
jruby -S gem install diff-lcs
|
10
9
|
|
11
10
|
h2. Running the scenarios
|
@@ -13,10 +12,7 @@ h2. Running the scenarios
|
|
13
12
|
Open a shell in this directory (java) and execute the following command:
|
14
13
|
|
15
14
|
<pre><code>
|
16
|
-
|
15
|
+
ant
|
17
16
|
</code></pre>
|
18
17
|
|
19
|
-
This will compile the java code and package it in a jar file, and then run Cucumber against
|
20
|
-
that code.
|
21
|
-
|
22
18
|
There is a deliberate error. See if you can fix it!
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<project name="Cucumber Demo" default="cucumber" basedir=".">
|
2
|
+
<target name ="compile" description="Compile classes">
|
3
|
+
<mkdir dir="build" />
|
4
|
+
<javac srcdir="src" destdir="build" />
|
5
|
+
</target>
|
6
|
+
|
7
|
+
<target name="cucumber" depends="compile" description="Run Cucumber">
|
8
|
+
<property environment="ENV" />
|
9
|
+
<fail unless="ENV.JRUBY_HOME">
|
10
|
+
(::) ERROR (::)
|
11
|
+
Define JRUBY_HOME in your shell. For example:
|
12
|
+
|
13
|
+
export JRUBY_HOME=/usr/local/jruby
|
14
|
+
set JRUBY_HOME=C:\jruby
|
15
|
+
</fail>
|
16
|
+
<java classname="org.jruby.Main" fork="true" failonerror="true">
|
17
|
+
<classpath>
|
18
|
+
<pathelement path="${ENV.JRUBY_HOME}/lib/jruby.jar"/>
|
19
|
+
<pathelement path="build"/>
|
20
|
+
</classpath>
|
21
|
+
<jvmarg value="-Djruby.home=${ENV.JRUBY_HOME}"/>
|
22
|
+
<arg value="-S"/>
|
23
|
+
<arg value="cucumber"/>
|
24
|
+
<arg value="--format"/>
|
25
|
+
<arg value="pretty"/>
|
26
|
+
<arg value="--format"/>
|
27
|
+
<arg value="junit"/>
|
28
|
+
<arg value="--out"/>
|
29
|
+
<arg value="build"/>
|
30
|
+
<arg value="features"/>
|
31
|
+
</java>
|
32
|
+
</target>
|
33
|
+
</project>
|
data/examples/selenium/Rakefile
CHANGED
File without changes
|
@@ -4,10 +4,10 @@ end
|
|
4
4
|
|
5
5
|
When /I search for "(.*)"/ do |query|
|
6
6
|
fill_in('q', :with => query)
|
7
|
-
click_button
|
7
|
+
click_button 'Google Search'
|
8
8
|
selenium.wait_for_page_to_load
|
9
9
|
end
|
10
10
|
|
11
11
|
Then /I should see a link to (.*)/ do |expected_url|
|
12
|
-
click_link
|
12
|
+
click_link expected_url
|
13
13
|
end
|
@@ -17,6 +17,7 @@ require 'spec/expectations'
|
|
17
17
|
|
18
18
|
# Webrat
|
19
19
|
require 'webrat'
|
20
|
+
|
20
21
|
Webrat.configure do |config|
|
21
22
|
config.mode = :selenium
|
22
23
|
end
|
@@ -31,11 +32,14 @@ end
|
|
31
32
|
|
32
33
|
# START HACK
|
33
34
|
# Disable Rails-specific code
|
34
|
-
|
35
|
-
def self.
|
35
|
+
class Webrat::Selenium::ApplicationServer
|
36
|
+
def self.boot
|
37
|
+
|
38
|
+
STDOUT.puts "Starting app server"
|
36
39
|
end
|
37
40
|
|
38
|
-
def self.
|
41
|
+
def self.stop_at_exit
|
42
|
+
STDOUT.puts "Stopping app server"
|
39
43
|
end
|
40
44
|
end
|
41
45
|
# END HACK
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Feature: multiline
|
2
|
+
|
3
|
+
Background: I'm a multiline name
|
4
|
+
which goes on and on and on for three lines
|
5
|
+
yawn
|
6
|
+
Given passing without a table
|
7
|
+
|
8
|
+
Scenario: I'm a multiline name
|
9
|
+
which goes on and on and on for three lines
|
10
|
+
yawn
|
11
|
+
Given passing without a table
|
12
|
+
|
13
|
+
Scenario Outline: I'm a multiline name
|
14
|
+
which goes on and on and on for three lines
|
15
|
+
yawn
|
16
|
+
Given <state> without a table
|
17
|
+
Examples:
|
18
|
+
| state |
|
19
|
+
|passing|
|
20
|
+
|
21
|
+
Scenario Outline: name
|
22
|
+
Given <state> without a table
|
23
|
+
Examples: I'm a multiline name
|
24
|
+
which goes on and on and on for three lines
|
25
|
+
yawn
|
26
|
+
| state |
|
27
|
+
|passing|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Feature: search examples
|
2
|
+
|
3
|
+
Background: Hantu Pisang background match
|
4
|
+
Given passing without a table
|
5
|
+
|
6
|
+
Scenario: should match Hantu Pisang
|
7
|
+
Given passing without a table
|
8
|
+
|
9
|
+
Scenario: Ignore me
|
10
|
+
Given failing without a table
|
11
|
+
|
12
|
+
Scenario Outline: Ignore me
|
13
|
+
Given <state> without a table
|
14
|
+
Examples:
|
15
|
+
| state |
|
16
|
+
| failing |
|
17
|
+
|
18
|
+
Scenario Outline: Hantu Pisang match
|
19
|
+
Given <state> without a table
|
20
|
+
Examples:
|
21
|
+
| state |
|
22
|
+
| passing |
|
23
|
+
|
24
|
+
Scenario Outline: no match in name but in examples
|
25
|
+
Given <state> without a table
|
26
|
+
Examples: Hantu Pisang
|
27
|
+
| state |
|
28
|
+
| passing |
|
29
|
+
|
30
|
+
Examples: Ignore me
|
31
|
+
| state |
|
32
|
+
| failing |
|
@@ -68,3 +68,14 @@ end
|
|
68
68
|
|
69
69
|
Given /^another unused$/ do
|
70
70
|
end
|
71
|
+
|
72
|
+
after_file = File.expand_path(File.dirname(__FILE__) + '/../../tmp/after.txt')
|
73
|
+
|
74
|
+
Before do
|
75
|
+
FileUtils.rm(after_file) if File.exist?(after_file)
|
76
|
+
end
|
77
|
+
|
78
|
+
After('@after_file') do
|
79
|
+
FileUtils.mkdir_p(File.dirname(after_file))
|
80
|
+
FileUtils.touch(after_file)
|
81
|
+
end
|
@@ -1 +1,17 @@
|
|
1
|
-
require 'spec/expectations'
|
1
|
+
require 'spec/expectations'
|
2
|
+
|
3
|
+
Before('@not_used') do
|
4
|
+
raise "Should never run"
|
5
|
+
end
|
6
|
+
|
7
|
+
After('@not_used') do
|
8
|
+
raise "Should never run"
|
9
|
+
end
|
10
|
+
|
11
|
+
Before('@background_tagged_before_on_outline') do
|
12
|
+
@cukes = '888'
|
13
|
+
end
|
14
|
+
|
15
|
+
After('@background_tagged_before_on_outline') do
|
16
|
+
@cukes.should == '888'
|
17
|
+
end
|
data/examples/sinatra/Rakefile
CHANGED
data/examples/test_unit/Rakefile
CHANGED
data/examples/tickets/Rakefile
CHANGED
@@ -2,15 +2,15 @@ $:.unshift(File.dirname(__FILE__) + '/../../lib')
|
|
2
2
|
require 'cucumber/rake/task'
|
3
3
|
|
4
4
|
Cucumber::Rake::Task.new(:pretty) do |t|
|
5
|
-
t.cucumber_opts =
|
5
|
+
t.cucumber_opts = %w{--tags ~@intentional_failure --format pretty -q}
|
6
6
|
end
|
7
7
|
|
8
8
|
Cucumber::Rake::Task.new(:html) do |t|
|
9
|
-
t.cucumber_opts =
|
9
|
+
t.cucumber_opts = %w{--tags ~@intentional_failure --format html --out features.html}
|
10
10
|
end
|
11
11
|
|
12
12
|
Cucumber::Rake::Task.new(:progress) do |t|
|
13
|
-
t.cucumber_opts =
|
13
|
+
t.cucumber_opts = %w{--tags ~@intentional_failure --format progress -i -s}
|
14
14
|
end
|
15
15
|
|
16
16
|
task :default => [:pretty, :html, :progress]
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec/expectations'
|
2
|
+
|
3
|
+
Before('@i_am_so_special') do
|
4
|
+
@something_special = 10
|
5
|
+
end
|
6
|
+
|
7
|
+
After('@i_am_so_special') do
|
8
|
+
@something_special.should == 20
|
9
|
+
end
|
10
|
+
|
11
|
+
When /special me goes to town/ do
|
12
|
+
@something_special.should == 10
|
13
|
+
@something_special = 20
|
14
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Feature: Unsubstituted argument placeholder
|
2
2
|
|
3
3
|
Scenario Outline: See Annual Leave Details (as Management & Human Resource)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
Given the following users exist in the system
|
5
|
+
| name | email | role_assignments | group_memberships |
|
6
|
+
| Jane | jane@fmail.com | <role> | Sales (manager) |
|
7
|
+
| Max | max@fmail.com | | Sales (member) |
|
8
|
+
| Carol | carol@fmail.com | | Sales (member) |
|
9
|
+
| Cat | cat@fmail.com | | |
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
Examples:
|
12
|
+
| role |
|
13
|
+
| HUMAN RESOURCE |
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@intentional_failure
|
2
|
+
Feature: Hooks
|
3
|
+
In order to integrate with my complex environment
|
4
|
+
I need to check scenario status in an After block
|
5
|
+
|
6
|
+
@272_failed
|
7
|
+
Scenario: Failed
|
8
|
+
Given I fail
|
9
|
+
|
10
|
+
@272_undefined
|
11
|
+
Scenario: Undefined
|
12
|
+
Given I am undefined
|
13
|
+
|
14
|
+
@272_passed
|
15
|
+
Scenario: Passed
|
16
|
+
Given I pass
|
17
|
+
|
18
|
+
@272_outline
|
19
|
+
Scenario Outline: Should work too
|
20
|
+
Given <something>
|
21
|
+
|
22
|
+
Examples:
|
23
|
+
| something |
|
24
|
+
| I fail |
|
25
|
+
| I am undefined |
|
26
|
+
| I pass |
|