Sha256: ff16755e85496ea12406e52acc98fa7c1dec1195320d5af8ef3e8deb9b5ad1a7

Contents?: true

Size: 1.08 KB

Versions: 27

Compression:

Stored size: 1.08 KB

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require 'cucumber/formatter/progress'

module Cucumber
  module Formatter
    describe Progress do

      before(:each) do
        Term::ANSIColor.coloring = false
        @out = StringIO.new
        progress = Progress.new(mock("step mother"), @out, {})
        @visitor = Ast::TreeWalker.new(nil, [progress])
      end
 
      describe "visiting a table cell value without a status" do
        it "should take the status from the last run step" do
          @visitor.visit_step_result('', '', nil, :failed, nil, 10, nil)
          outline_table = mock()
          outline_table.should_receive(:accept) do |visitor|
            visitor.visit_table_cell_value('value', nil)
          end
          @visitor.visit_outline_table(outline_table)

          @out.string.should == "FF"
        end
      end

      describe "visiting a table cell which is a table header" do
        it "should not output anything" do
          @visitor.visit_table_cell_value('value', :skipped_param)

          @out.string.should == ""
        end
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 7 rubygems

Version Path
aslakhellesoy-cucumber-0.3.103 spec/cucumber/formatter/progress_spec.rb
aslakhellesoy-cucumber-0.3.104 spec/cucumber/formatter/progress_spec.rb
kosmas58-cucumber-0.3.103 spec/cucumber/formatter/progress_spec.rb
davidtrogers-cucumber-0.6.2 spec/cucumber/formatter/progress_spec.rb
cucumber-0.6.2 spec/cucumber/formatter/progress_spec.rb
cucumber-0.6.1 spec/cucumber/formatter/progress_spec.rb
cucumber-0.6.0 spec/cucumber/formatter/progress_spec.rb
cucumber-0.5.3 spec/cucumber/formatter/progress_spec.rb
cucumber-0.5.2 spec/cucumber/formatter/progress_spec.rb
cucumber-0.5.1 spec/cucumber/formatter/progress_spec.rb
cucumber-0.5.0 spec/cucumber/formatter/progress_spec.rb
cucumber-0.4.5.rc2 spec/cucumber/formatter/progress_spec.rb
kbaum-cucumber-0.4.5.pre spec/cucumber/formatter/progress_spec.rb
cucumber-0.4.5.rc1 spec/cucumber/formatter/progress_spec.rb
middleman-0.10.17 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/formatter/progress_spec.rb
middleman-0.10.16 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/formatter/progress_spec.rb
middleman-0.10.15 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/formatter/progress_spec.rb
rackjour-0.1.8 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/formatter/progress_spec.rb
middleman-0.10.14 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/formatter/progress_spec.rb
cucumber-0.4.4 spec/cucumber/formatter/progress_spec.rb