Sha256: 539f766c85dbb8550830daf11b83601258cc8fcbec1d0788d8f491c43bbdbb6d

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'spec_helper')

describe 'Base printer' do

  describe '> getting any printer' do

    should 'raise Clamsy::PrinterNotFoundError when printer is not yet defined' do
      lambda { Clamsy::BasePrinter.get('super_duper', 'dummy_config') }.
        should.raise(Clamsy::PrinterNotFoundError).
        message.should.equal("Printer 'super_duper' cannot be found.")
    end

    should "return Clamsy::CupsPdfPrinter when printer is 'cups_pdf'" do
      Clamsy::BasePrinter.get('cups_pdf', 'dummy_config').should.equal Clamsy::CupsPdfPrinter
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clamsy-0.0.5 spec/clamsy/base_printer_spec.rb
clamsy-0.0.4 spec/clamsy/base_printer_spec.rb