Sha256: a5d66f5486ceb830100092f68a78a9c54ada5e42c08b8d5107d5301fdd2da2c0
Contents?: true
Size: 1.35 KB
Versions: 1
Compression:
Stored size: 1.35 KB
Contents
require "#{File.dirname(__FILE__)}/../spec_helper" SimpleCov.command_name('TableRow') unless RUBY_VERSION.to_s < '1.9.0' describe 'TableRow, Unit' do clazz = CucumberAnalytics::TableRow 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 | row |' expect { @element = clazz.new(source) }.to_not raise_error # Sanity check in case instantiation failed in a non-explosive manner expect(@element.cells).to eq(['a', 'row']) end before(:each) do @row = clazz.new end it 'has cells' do expect(@row.respond_to?(:cells)).to be true end it 'can get and set its cells' do @row.cells = :some_cells expect(@row.cells).to eq(:some_cells) @row.cells = :some_other_cells expect(@row.cells).to eq(:some_other_cells) end it 'starts with no cells' do expect(@row.cells).to eq([]) end context 'table row output edge cases' do it 'is a String' do expect(@row.to_s).to be_a(String) end it 'can output an empty table row' do expect { @row.to_s }.to_not raise_error end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber_analytics-1.6.0 | testing/rspec/spec/unit/table_row_unit_spec.rb |