aslakhellesoy-cucumber 0.3.102.2 → 0.3.103
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 +5 -2
- data/Manifest.txt +2 -0
- data/examples/self_test/features/sample.feature +1 -1
- data/examples/self_test/features/search_sample.feature +1 -1
- data/features/custom_formatter.feature +4 -4
- data/lib/cucumber/ast.rb +1 -0
- data/lib/cucumber/ast/table.rb +4 -4
- data/lib/cucumber/ast/visitor.rb +2 -106
- data/lib/cucumber/cli/configuration.rb +28 -28
- data/lib/cucumber/cli/language_help_formatter.rb +5 -7
- data/lib/cucumber/cli/main.rb +3 -3
- data/lib/cucumber/formatter/html.rb +203 -113
- data/lib/cucumber/formatter/junit.rb +29 -23
- data/lib/cucumber/formatter/pdf.rb +74 -69
- data/lib/cucumber/formatter/pretty.rb +93 -78
- data/lib/cucumber/formatter/profile.rb +2 -2
- data/lib/cucumber/formatter/progress.rb +16 -10
- data/lib/cucumber/formatter/rerun.rb +4 -5
- data/lib/cucumber/formatter/steps.rb +2 -3
- data/lib/cucumber/formatter/tag_cloud.rb +7 -6
- data/lib/cucumber/formatter/usage.rb +4 -7
- data/lib/cucumber/version.rb +2 -2
- data/spec/cucumber/ast/background_spec.rb +1 -2
- data/spec/cucumber/ast/scenario_outline_spec.rb +3 -2
- data/spec/cucumber/ast/scenario_spec.rb +1 -1
- data/spec/cucumber/formatter/html_spec.rb +221 -2
- data/spec/cucumber/formatter/progress_spec.rb +9 -4
- data/spec/cucumber/parser/feature_parser_spec.rb +31 -27
- metadata +1 -1
| @@ -8,13 +8,18 @@ module Cucumber | |
| 8 8 | 
             
                  before(:each) do
         | 
| 9 9 | 
             
                    Term::ANSIColor.coloring = false
         | 
| 10 10 | 
             
                    @out = StringIO.new
         | 
| 11 | 
            -
                     | 
| 11 | 
            +
                    progress = Progress.new(mock("step mother"), @out, {})
         | 
| 12 | 
            +
                    @visitor = Ast::TreeWalker.new(nil, [progress])
         | 
| 12 13 | 
             
                  end
         | 
| 13 14 |  | 
| 14 15 | 
             
                  describe "visiting a table cell value without a status" do
         | 
| 15 16 | 
             
                    it "should take the status from the last run step" do
         | 
| 16 | 
            -
                      @ | 
| 17 | 
            -
                       | 
| 17 | 
            +
                      @visitor.visit_step_result('', '', nil, :failed, nil, 10, nil)
         | 
| 18 | 
            +
                      outline_table = mock()
         | 
| 19 | 
            +
                      outline_table.should_receive(:accept) do |visitor|
         | 
| 20 | 
            +
                        visitor.visit_table_cell_value('value', nil)
         | 
| 21 | 
            +
                      end
         | 
| 22 | 
            +
                      @visitor.visit_outline_table(outline_table)
         | 
| 18 23 |  | 
| 19 24 | 
             
                      @out.string.should == "FF"
         | 
| 20 25 | 
             
                    end
         | 
| @@ -22,7 +27,7 @@ module Cucumber | |
| 22 27 |  | 
| 23 28 | 
             
                  describe "visiting a table cell which is a table header" do
         | 
| 24 29 | 
             
                    it "should not output anything" do
         | 
| 25 | 
            -
                      @ | 
| 30 | 
            +
                      @visitor.visit_table_cell_value('value', :skipped_param)
         | 
| 26 31 |  | 
| 27 32 | 
             
                      @out.string.should == ""
         | 
| 28 33 | 
             
                    end
         | 
| @@ -361,34 +361,38 @@ Given I am a step | |
| 361 361 |  | 
| 362 362 | 
             
                  describe "Filtering" do
         | 
| 363 363 | 
             
                    it "should filter outline tables" do
         | 
| 364 | 
            -
                       | 
| 365 | 
            -
             | 
| 366 | 
            -
                       | 
| 367 | 
            -
                       | 
| 364 | 
            +
                      path = '/self_test/features/outline_sample.feature'
         | 
| 365 | 
            +
                      f = parse_example_file("#{path}:12")
         | 
| 366 | 
            +
                      actual_sexp = f.to_sexp
         | 
| 367 | 
            +
                      
         | 
| 368 | 
            +
                      # check path is equivalent, if not same
         | 
| 369 | 
            +
                      File.expand_path(actual_sexp[1]).should == File.expand_path(File.dirname(__FILE__) + "/../../../examples#{path}")
         | 
| 370 | 
            +
                      actual_sexp[1] = 'made/up/path.feature'
         | 
| 371 | 
            +
                      actual_sexp.should ==
         | 
| 368 372 | 
             
                      [:feature,
         | 
| 369 | 
            -
             | 
| 370 | 
            -
             | 
| 371 | 
            -
             | 
| 372 | 
            -
             | 
| 373 | 
            -
             | 
| 374 | 
            -
             | 
| 375 | 
            -
             | 
| 376 | 
            -
             | 
| 377 | 
            -
             | 
| 378 | 
            -
             | 
| 379 | 
            -
             | 
| 380 | 
            -
             | 
| 381 | 
            -
             | 
| 382 | 
            -
             | 
| 383 | 
            -
             | 
| 384 | 
            -
             | 
| 385 | 
            -
             | 
| 386 | 
            -
             | 
| 387 | 
            -
             | 
| 388 | 
            -
             | 
| 389 | 
            -
             | 
| 390 | 
            -
                         | 
| 391 | 
            -
             | 
| 373 | 
            +
                        'made/up/path.feature',
         | 
| 374 | 
            +
                        "Feature: Outline Sample",
         | 
| 375 | 
            +
                        [:scenario_outline,
         | 
| 376 | 
            +
                          "Scenario Outline:",
         | 
| 377 | 
            +
                          "Test state",
         | 
| 378 | 
            +
                          [:step, 6, "Given", "<state> without a table"],
         | 
| 379 | 
            +
                          [:step, 7, "Given", "<other_state> without a table"],
         | 
| 380 | 
            +
                          [:examples,
         | 
| 381 | 
            +
                            "Examples:",
         | 
| 382 | 
            +
                            "Rainbow colours",
         | 
| 383 | 
            +
                            [:table,
         | 
| 384 | 
            +
                              [:row, 9, 
         | 
| 385 | 
            +
                                [:cell, "state"], 
         | 
| 386 | 
            +
                                [:cell, "other_state"]
         | 
| 387 | 
            +
                              ],
         | 
| 388 | 
            +
                              [:row, 12, 
         | 
| 389 | 
            +
                                [:cell, "failing"], 
         | 
| 390 | 
            +
                                [:cell, "passing"]
         | 
| 391 | 
            +
                              ]
         | 
| 392 | 
            +
                            ]
         | 
| 393 | 
            +
                          ]
         | 
| 394 | 
            +
                        ]
         | 
| 395 | 
            +
                      ]
         | 
| 392 396 | 
             
                    end
         | 
| 393 397 | 
             
                  end
         | 
| 394 398 | 
             
                end
         |