Sha256: 950a3131d7d671d1cbf927c646e648fe6274c057852bb1e18b18b292e710b82a

Contents?: true

Size: 985 Bytes

Versions: 7

Compression:

Stored size: 985 Bytes

Contents

require 'spec_helper'

shared_examples_for 'a feature element' do |clazz|

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

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

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

  it 'has a description - #description' do
    @element.should respond_to(:description)
  end

  it 'can get and set its description - #description, #description=' do
    @element.description = :some_description
    @element.description.should == :some_description
    @element.description = :some_other_description
    @element.description.should == :some_other_description
  end

  it 'starts with no name' do
    @element.name.should == ''
  end

  it 'starts with no description' do
    @element.description.should == []
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cucumber_analytics-1.4.2 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.4.1 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.4.0 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.3.0 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.2.0 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.1.1 spec/unit/feature_element_unit_specs.rb
cucumber_analytics-1.0.0 spec/unit/feature_element_unit_specs.rb