Sha256: f265514df83a17af499b9fa6ae0f0e3e4667c35360edd6289ec24687e17edd52

Contents?: true

Size: 1.32 KB

Versions: 16

Compression:

Stored size: 1.32 KB

Contents

require 'spec_helper'

module TurnipFormatter::Scenario
  describe Failure do
    include_context 'turnip_formatter standard scenario metadata'
    include_context 'turnip_formatter pending scenario setup'

    let(:scenario) { ::TurnipFormatter::Scenario::Pending.new(pending_example) }

    context 'Turnip example' do
      let(:pending_example) do
        example.execution_result[:pending_message] = 'No such step(0): '
        example
      end

      describe '#validation' do
        it 'should not raise exception' do
          expect { scenario.validation }.not_to raise_error
        end
      end
    end

    context 'Not Turnip example' do
      let(:pending_example) do
        example
      end

      context 'Not pending example' do
        include_context 'turnip_formatter scenario setup'

        describe '#validation' do
          it 'should raise exception' do
            expect {
              scenario.validation
            }.to raise_error NotPendingScenarioError
          end
        end        
      end

      context 'Not exist pending step information' do
        describe '#validation' do
          it 'should raise exception' do
            expect {
              scenario.validation
            }.to raise_error NoExistPendingStepInformationError
          end
        end        
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
turnip_formatter-0.2.11 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.10 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.9 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.8 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.7 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.6 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.5 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.4 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.3 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.2 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.1 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.2.0 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.1.2 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.1.1 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.1.0 spec/turnip_formatter/scenario/pending_spec.rb
turnip_formatter-0.0.6 spec/turnip_formatter/scenario/pending_spec.rb