Sha256: 792483a159691b2797de2388305446f3942fd9ee1e77537439e7ea727d080d9d

Contents?: true

Size: 896 Bytes

Versions: 9

Compression:

Stored size: 896 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'spec_helper'

describe OCRSDK::Verifiers::Profile do
  let (:class_with_module) {
    Class.new do
      include OCRSDK::Verifiers::Profile
    end
  }
  subject { class_with_module.new }

  it "should have list of possible profiles" do
    OCRSDK::Verifiers::Profile::PROFILES.length.should > 0
  end

  it "should convert profile to string" do
    subject.profile_to_s(:meow_meow).should == 'meowMeow'
  end

  describe ".supported_profile?" do
    it "should return false for incorrect profile" do 
      subject.supported_profile?(:meow_meow).should be_false
    end

    it "should return true for correct profile as symbol" do
      subject.supported_profile?(:document_conversion).should be_true
    end

    it "should return true for correct profile as string" do
      subject.supported_profile?("documentConversion").should be_true
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ocrsdk-0.3.4 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.3.3 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.3.2 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.3.1 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.3.0 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.2.0 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.1.2 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.1.1 spec/ocrsdk/verifiers/profile_spec.rb
ocrsdk-0.1.0 spec/ocrsdk/verifiers/profile_spec.rb