Sha256: a9fa646fe187bc1aaa11c7444d171799f70136107b0bbb8ee1aaad610ce0346a

Contents?: true

Size: 893 Bytes

Versions: 4

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'

SimpleCov.command_name('Background') unless RUBY_VERSION.to_s < '1.9.0'

describe 'Background, Unit' do

  clazz = CucumberAnalytics::Background

  it_should_behave_like 'a feature element', clazz
  it_should_behave_like 'a nested element', clazz
  it_should_behave_like 'a containing element', clazz
  it_should_behave_like 'a bare bones element', clazz
  it_should_behave_like 'a prepopulated element', clazz
  it_should_behave_like 'a test element', clazz
  it_should_behave_like 'a sourced element', clazz
  it_should_behave_like 'a raw element', clazz

  it 'can be parsed from stand alone text' do
    source = 'Background: test background'

    expect { @element = clazz.new(source) }.to_not raise_error

    # Sanity check in case instantiation failed in a non-explosive manner
    @element.name.should == 'test background'
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cucumber_analytics-1.4.2 spec/unit/background_unit_spec.rb
cucumber_analytics-1.4.1 spec/unit/background_unit_spec.rb
cucumber_analytics-1.4.0 spec/unit/background_unit_spec.rb
cucumber_analytics-1.3.0 spec/unit/background_unit_spec.rb