spec/lib/presenter_spec.rb in table_cloth-0.3.0.beta1 vs spec/lib/presenter_spec.rb in table_cloth-0.3.0.beta2

- old
+ new

@@ -57,16 +57,16 @@ expect(subject.rows).to eq(expected) end context 'tags' do it '.wrapper_tag includes config for a tag in block form' do - TableCloth::Configuration.table.should_receive(:to_hash).and_return(class: "stuff") + TableCloth::Configuration.table.should_receive(:to_hash).once.and_return(class: "stuff") table = subject.wrapper_tag(:table) { "Hello "} Nokogiri::HTML(table).at_xpath('//table')[:class].should == 'stuff' end it '.wrapper_tag includes config for a tag without a block' do - TableCloth::Configuration.table.should_receive(:to_hash).and_return(class: "stuff") + TableCloth::Configuration.table.should_receive(:to_hash).once.and_return(class: "stuff") table = subject.wrapper_tag(:table, 'Hello') Nokogiri::HTML(table).at_xpath('//table')[:class].should == 'stuff' end end end \ No newline at end of file