spec/lib/exclude_spec.rb in masticate-0.2.3 vs spec/lib/exclude_spec.rb in masticate-0.3

- old
+ new

@@ -10,6 +10,16 @@ output = File.read(tmp) correct_output = File.read(File.dirname(__FILE__) + "/../data/exclude_results.csv") output.should == correct_output end + + it "should be able to exclude rows by number as well as name" do + filename = File.dirname(__FILE__) + "/../data/exclude_input.csv" + tmp = Tempfile.new('exclude') + results = Masticate.exclude(filename, :output => tmp, :field => 1, :value => '') + output = File.read(tmp) + correct_output = File.read(File.dirname(__FILE__) + "/../data/exclude_results.csv") + + output.should == correct_output + end end