spec/rtesseract_spec.rb in rtesseract-1.2.3 vs spec/rtesseract_spec.rb in rtesseract-1.2.4

- old
+ new

@@ -72,9 +72,16 @@ #Inválid lang object RTesseract.new(@image_tiff,{:lang=>MakeStringError.new}).lang.should eql("") end + it " select options" do + expect(RTesseract.new(@image_tiff).options_cmd).to eql([]) + expect(RTesseract.new(@image_tiff, options: 'digits').options_cmd).to eql(['digits']) + expect(RTesseract.new(@image_tiff, options: :digits).options_cmd).to eql([:digits]) + expect(RTesseract.new(@image_tiff, options: [:digits, :quiet]).options_cmd).to eql([:digits, :quiet]) + end + it " be configurable" do RTesseract.new(@image_tiff,{:chop_enable=>0,:enable_assoc=>0,:display_text=>0}).config.should eql("chop_enable 0\nenable_assoc 0\ndisplay_text 0") RTesseract.new(@image_tiff,{:chop_enable=>0}).config.should eql("chop_enable 0") RTesseract.new(@image_tiff,{:chop_enable=>0,:enable_assoc=>0}).config.should eql("chop_enable 0\nenable_assoc 0") RTesseract.new(@image_tiff,{:chop_enable=>0}).to_s_without_spaces.should eql("43ZZ")