cucumber 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Cucumber #:nodoc:
2
2
  class VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 14
5
+ TINY = 15
6
6
  PATCH = nil # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
@@ -360,21 +360,48 @@ module Cucumber
360
360
 
361
361
  describe "colour" do
362
362
 
363
- before(:all) do
364
- Term::ANSIColor.coloring = true
363
+ before(:each) do
364
+ ::Term::ANSIColor.coloring = true
365
+ @io = StringIO.new
366
+ @formatter = PrettyFormatter.new @io, mock('step_mother')
365
367
  end
368
+
369
+ it "should show the scenario outline keyword and title as pending blue" do
370
+ @formatter.scenario_executing(mock_scenario(:outline? => true, :name => 'blue'))
366
371
 
367
- after(:all) do
368
- Term::ANSIColor.coloring = false
372
+ @io.string.should =~ /\e\[36m\s*Scenario Outline: blue\e\[0m/
369
373
  end
374
+
375
+ it "should show passing steps as green" do
376
+ @formatter.scenario_executing(mock_scenario)
377
+ @formatter.step_passed(mock_step, nil, nil)
378
+ @formatter.dump
370
379
 
371
- it "should show the scenario outline keyword and title as pending blue" do
372
- ::Term::ANSIColor.coloring = true
373
- io = StringIO.new
374
- formatter = PrettyFormatter.new io, mock('step_mother')
375
- formatter.scenario_executing(mock_scenario(:outline? => true, :name => 'blue'))
380
+ @io.string.should =~ /\e\[32m1 step passed\e/
381
+ end
382
+
383
+ it "should show pending steps as yellow" do
384
+ @formatter.scenario_executing(mock_scenario)
385
+ @formatter.step_pending(mock_step, nil, nil)
386
+ @formatter.dump
387
+
388
+ @io.string.should =~ /\e\[33m1 step pending\e/
389
+ end
390
+
391
+ it "should show failed steps as red" do
392
+ @formatter.scenario_executing(mock_scenario)
393
+ @formatter.step_failed(mock_step(:error => mock_error(:cucumber_backtrace => [])), nil, nil)
394
+ @formatter.dump
395
+
396
+ @io.string.should =~ /\e\[31m1 step failed\e/
397
+ end
398
+
399
+ it "should show skipped steps as cyan" do
400
+ @formatter.scenario_executing(mock_scenario)
401
+ @formatter.step_skipped(mock_step, nil, nil)
402
+ @formatter.dump
376
403
 
377
- io.string.should =~ /\e\[36m\s*Scenario Outline: blue\e\[0m/
404
+ @io.string.should =~ /\e\[36m1 step skipped\e/
378
405
  end
379
406
 
380
407
  end
@@ -20,10 +20,15 @@ module Cucumber
20
20
  end
21
21
 
22
22
  before(:each) do
23
+ ::Term::ANSIColor.coloring = false
23
24
  @io = StringIO.new
24
25
  step_mother = stub('step_mother')
25
26
  @formatter = ProfileFormatter.new(io, step_mother)
26
27
  end
28
+
29
+ after(:each) do
30
+ ::Term::ANSIColor.coloring = true
31
+ end
27
32
 
28
33
  it "should print a heading" do
29
34
  formatter.visit_features(nil)
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.1.14
4
+ version: 0.1.15
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-01-04 00:00:00 +01:00
12
+ date: 2009-01-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -133,6 +133,11 @@ files:
133
133
  - examples/i18n/ja/features/division.feature
134
134
  - examples/i18n/ja/features/step_definitons/calculator_steps.rb
135
135
  - examples/i18n/ja/lib/calculator.rb
136
+ - examples/i18n/ko/Rakefile
137
+ - examples/i18n/ko/features/addition.feature
138
+ - examples/i18n/ko/features/division.feature
139
+ - examples/i18n/ko/features/step_definitons/calculator_steps.rb
140
+ - examples/i18n/ko/lib/calculator.rb
136
141
  - examples/i18n/lt/Rakefile
137
142
  - examples/i18n/lt/features/addition.feature
138
143
  - examples/i18n/lt/features/division.feature
@@ -167,6 +172,9 @@ files:
167
172
  - examples/selenium/Rakefile
168
173
  - examples/selenium/features/search.feature
169
174
  - examples/selenium/features/step_definitons/stories_steps.rb
175
+ - examples/self_test/README.textile
176
+ - examples/self_test/features/sample.feature
177
+ - examples/self_test/features/step_definitions/sample_steps.rb
170
178
  - examples/test_unit/Rakefile
171
179
  - examples/test_unit/features/step_definitions/test_unit_steps.rb
172
180
  - examples/test_unit/features/test_unit.feature
@@ -183,8 +191,10 @@ files:
183
191
  - examples/watir/features/search.feature
184
192
  - examples/watir/features/step_definitons/search_steps.rb
185
193
  - examples/watir/features/support/env.rb
186
- - features/see_features.feature
187
- - features/steps/features_steps.rb
194
+ - features/cucumber_cli.feature
195
+ - features/step_definitions/cucumber_steps.rb
196
+ - features/step_definitions/extra_steps.rb
197
+ - features/support/env.rb
188
198
  - gem_tasks/deployment.rake
189
199
  - gem_tasks/environment.rake
190
200
  - gem_tasks/features.rake
@@ -249,6 +259,7 @@ files:
249
259
  - lib/cucumber/treetop_parser/feature_id.rb
250
260
  - lib/cucumber/treetop_parser/feature_it.rb
251
261
  - lib/cucumber/treetop_parser/feature_ja.rb
262
+ - lib/cucumber/treetop_parser/feature_ko.rb
252
263
  - lib/cucumber/treetop_parser/feature_lt.rb
253
264
  - lib/cucumber/treetop_parser/feature_nl.rb
254
265
  - lib/cucumber/treetop_parser/feature_no.rb
@@ -1,8 +0,0 @@
1
- Feature: See features
2
- In order to make Cucumber features more accessible
3
- I should be able to see the existing features in a system
4
-
5
- Scenario: See features as HTML
6
- Given the feature server is running
7
- When I visit "/features"
8
- Then I should see a link to "See features"
@@ -1,9 +0,0 @@
1
- Given /the feature server is running/ do
2
- raise "TODO"
3
- end
4
-
5
- When /I visit "(.*)"/ do |resource|
6
- end
7
-
8
- Then /I should see a link to "(.*)"/ do |text|
9
- end