Sha256: 42c035af3cb64655e530efc974e5e63ca5b482ebd3046ada78cfccdbeb9ae9c3
Contents?: true
Size: 768 Bytes
Versions: 12
Compression:
Stored size: 768 Bytes
Contents
require 'rspec' require 'gherkin/gherkin_line' describe Gherkin::GherkinLine do context '#table_cell' do def cells_text(line) Gherkin::GherkinLine.new(line, 12).table_cells.map(&:text) end it 'trims white spaces before cell content' do expect(cells_text("| \t spaces before|")).to eq(['spaces before']) end it 'trims white spaces after cell content' do expect(cells_text("|spaces after |")).to eq(['spaces after']) end it 'trims white spaces around cell content' do expect(cells_text("| \t spaces everywhere \t|")).to eq(['spaces everywhere']) end it 'does not drop white spaces inside a cell' do expect(cells_text("| foo()\n bar\nbaz |")).to eq(["foo()\n bar\nbaz"]) end end end
Version data entries
12 entries across 12 versions & 1 rubygems