Sha256: e2d1714206479d23081eb1f4c85eabee866ddcfd8c43a90e6072cfc431fd7d51
Contents?: true
Size: 1.24 KB
Versions: 6
Compression:
Stored size: 1.24 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 @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' do @element.should respond_to(:description) @element.should respond_to(:description_text) end it 'can get and set its description' do @element.description = :some_description @element.description.should == :some_description @element.description = :some_other_description @element.description.should == :some_other_description @element.description_text = :some_description @element.description_text.should == :some_description @element.description_text = :some_other_description @element.description_text.should == :some_other_description end it 'starts with no name' do @element.name.should == '' end it 'starts with no description' do @element.description.should == [] @element.description_text.should == '' end end
Version data entries
6 entries across 6 versions & 2 rubygems