Sha256: b300807f3ee859978a1f77a4197e91b763f835edf3cf57516508c08c73bb46da

Contents?: true

Size: 845 Bytes

Versions: 5

Compression:

Stored size: 845 Bytes

Contents

require 'spec_helper'
require 'turnip_formatter/printer/index'

module TurnipFormatter::Printer
  describe Index do

    let(:formatter) do
      {
        scenarios:      [],
        scenario_files: [],
        failed_count:   0,
        pending_count:  0,
        duration:       0
      }
    end

    subject { Index.print_out(formatter) }

    describe '.print_out' do
      it { should match %r{<h1>Turnip Report</h1>} }
    end

    context 'project_name is changed' do
      before do
        @original_project_name = TurnipFormatter.configuration.title
        TurnipFormatter.configuration.title = 'My Project'
      end

      describe '.print_out' do
        it { should match %r{<h1>My Project Report</h1>} }
      end

      after do
        TurnipFormatter.configuration.title = @original_project_name
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
turnip_formatter-0.6.0.pre.beta.2 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.6.0.pre.beta.1 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.5.0 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.4.0 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.3.4 spec/turnip_formatter/printer/index_spec.rb