Sha256: 6f0aa3463e1c6760dc59e591078b1380ef13f48b66048d3692b5ae4c486beb55

Contents?: true

Size: 531 Bytes

Versions: 3

Compression:

Stored size: 531 Bytes

Contents

require 'spec_helper.rb'

describe Proselytism::Converters::Base.instance do
  context "convert" do
    it "should intercept errors and log them before re raise them" do
      subject.should_receive(:perform).and_raise Proselytism::Converters::PdfImages::Error, 'stubbed error'
      subject.config.logger.should_receive(:error).with do |str|
        str.include? 'stubbed error'
      end
      proc{
        subject.convert 'io', :to => :txt
      }.should raise_error(Proselytism::Converters::PdfImages::Error)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
proselytism-0.0.3 spec/base_converter_spec.rb
proselytism-0.0.2 spec/base_converter_spec.rb
proselytism-0.0.1 spec/base_converter_spec.rb