spec/ocrsdk/image_spec.rb in ocrsdk-0.1.0 vs spec/ocrsdk/image_spec.rb in ocrsdk-0.1.1
- old
+ new
@@ -1,9 +1,16 @@
# -*- encoding : utf-8 -*-
require 'spec_helper'
describe OCRSDK::Image do
+ before do
+ OCRSDK.setup do |config|
+ config.application_id = 'app_id'
+ config.password = 'pass'
+ end
+ end
+
describe ".as_text" do
subject { OCRSDK::Image.new 'image.jpg' }
before { mock_ocrsdk }
it "should call api and return Promise" do
@@ -44,10 +51,10 @@
File.delete outpath
end
end
describe ".api_process_image" do
- subject { OCRSDK::Image.new 'image.jpg', 'app_id', 'pass' }
+ subject { OCRSDK::Image.new 'image.jpg' }
it "should raise UnsupportedLanguage on unsupported language" do
expect {
subject.instance_eval { api_process_image 'image.jpg', [:meow] }
}.to raise_error(OCRSDK::UnsupportedLanguage)