Sha256: f49edceda3c1a61f420018eeb20750114c5f3812692cefba72dd7af60ea0b0f0

Contents?: true

Size: 952 Bytes

Versions: 5

Compression:

Stored size: 952 Bytes

Contents

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

module TurnipFormatter::Printer
  describe Index do

    let(:formatter) do
      double("Formatter", {
          :scenarios        => [],
          :passed_scenarios => [],
          :failure_count    => 0,
          :pending_count    => 0,
          :duration         => 0
        })
    end

    describe '.print_out' do
      subject { Index.print_out(formatter) }

      it { should have_tag 'h1', text: 'Turnip Report' }
    end

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

      describe '.print_out' do
        subject { Index.print_out(formatter) }

        it { should have_tag 'h1', text: 'My Project Report' }
      end

      after do
        RSpec.configuration.project_name = @original_project_name
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
turnip_formatter-0.2.11 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.2.10 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.2.9 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.2.8 spec/turnip_formatter/printer/index_spec.rb
turnip_formatter-0.2.7 spec/turnip_formatter/printer/index_spec.rb