Sha256: 6c59c481097c07667c1ab9d016a05d10f3d74f79a021ee946931cac2a94d8e1a
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' require 'turnip_formatter/printer/scenario' module TurnipFormatter::Printer describe Scenario do include_context 'turnip_formatter scenario setup' include_context 'turnip_formatter standard scenario metadata' let(:scenario) do TurnipFormatter::Scenario::Pass.new(example) end context 'turnip example' do describe '.print_out' do subject { Scenario.print_out(scenario) } it { should have_tag 'a', with: { href: '#' + scenario.id } } it { should have_tag 'span.scenario_name', text: /Scenario: Scenario/ } it { should have_tag 'span.feature_name' } it { should have_tag 'ul.tags' } it { should have_tag 'ul.steps' } end end context 'not turnip example' do describe '.print_out' do before do allow(scenario).to receive(:validation) { raise NoFeatureFileError } expect(RuntimeError).to receive(:print_out) end it { Scenario.print_out(scenario) } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
turnip_formatter-0.2.11 | spec/turnip_formatter/printer/scenario_spec.rb |
turnip_formatter-0.2.10 | spec/turnip_formatter/printer/scenario_spec.rb |