Sha256: 81d6015830eb299034093bd540e83a78d647f94eef3dccacddfa1bf143112c0f

Contents?: true

Size: 939 Bytes

Versions: 5

Compression:

Stored size: 939 Bytes

Contents

require 'spec_helper'

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

describe 'Tag, Unit' do

  clazz = CucumberAnalytics::Tag

  it_should_behave_like 'a nested element', clazz
  it_should_behave_like 'a bare bones element', clazz
  it_should_behave_like 'a prepopulated 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 = '@a_tag'

    expect { @element = clazz.new(source) }.to_not raise_error
    @element.name.should == '@a_tag'
  end

  before(:each) do
    @element = clazz.new
  end


  it 'has a name' do
    @element.should respond_to(:name)
  end

  it 'can get and set its name' do
    @element.name = :some_name
    @element.name.should == :some_name
    @element.name = :some_other_name
    @element.name.should == :some_other_name
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

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