Sha256: c028587fffc10a1136933bcdf1e6e67061d49e8b6508d49bb7df7bf9c5524c49

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

shared_context "turnip_formatter scenario setup" do |assertion|
  let(:example) do
    assertion ||= proc { expect(true).to be true }
    group = ::RSpec::Core::ExampleGroup.describe('Feature').describe('Scenario')
    example = group.example('example', metadata, &assertion)
    group.run(NoopObject.new)
    example
  end
end

shared_context "turnip_formatter failure scenario setup" do |assertion|
  include_context 'turnip_formatter scenario setup', proc {
    expect(true).to be false
  }
end

shared_context "turnip_formatter pending scenario setup" do |assertion|
  include_context 'turnip_formatter scenario setup', proc {
    pending('Pending')
  }
end

shared_context 'turnip_formatter standard scenario metadata' do
  let(:metadata) do
    {
      turnip_formatter: {
        steps: [ { name: 'Step 1', extra_args: [], keyword: 'When' } ],
        tags: []
      },
      file_path: '/path/to/hoge.feature'
    }
  end
end

shared_context 'turnip_formatter standard step parameters' do
  let(:description) do
    { name: 'StepName', keyword: 'Keyword', extra_args: ['Docstring'] }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
turnip_formatter-0.2.11 spec/support/shared_context_examples.rb
turnip_formatter-0.2.10 spec/support/shared_context_examples.rb