Sha256: 6531c691137dfe7c238963b9ddb3648c1a950d50b934bc8c80d9b1046fe1ec02
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
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 expect(@element.respond_to?(:name)).to be true end it 'can get and set its name - #name, #name=' do @element.name = :some_name expect(@element.name).to eq(:some_name) @element.name = :some_other_name expect(@element.name).to eq(:some_other_name) end it 'has a description' do expect(@element.respond_to?(:description)).to be true expect(@element.respond_to?(:description_text)).to be true end it 'can get and set its description' do @element.description = :some_description expect(@element.description).to eq(:some_description) @element.description = :some_other_description expect(@element.description).to eq(:some_other_description) @element.description_text = :some_description expect(@element.description_text).to eq(:some_description) @element.description_text = :some_other_description expect(@element.description_text).to eq(:some_other_description) end it 'starts with no name' do expect(@element.name).to eq('') end it 'starts with no description' do expect(@element.description).to eq([]) expect(@element.description_text).to eq('') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber_analytics-1.5.2 | spec/unit/feature_element_unit_specs.rb |