Sha256: f4ecb03128f2c61920e2536968bccdc76f99d6910c75ee1de7678ff5f76dee1a

Contents?: true

Size: 553 Bytes

Versions: 3

Compression:

Stored size: 553 Bytes

Contents

require 'spec_helper'

describe Languages::Epl2::Barcode1D do
  context "code 128" do
    it "#render" do
      font = Languages::Epl2::Font.new 
      barcode = Languages::Epl2::Barcode1D.new :code_128, :at => [1,2], :text => "3"
      expect(barcode.render).to eq("B1,2,0,1,2,2,50,B,\"3\"")
    end
  end
  context "ean13" do
    it "#render" do
      font = Languages::Epl2::Font.new 
      barcode = Languages::Epl2::Barcode1D.new :ean13, :at => [1,2], :text => "3"
      expect(barcode.render).to eq("B1,2,0,E30,2,2,50,B,\"3\"")
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zebra_printer-0.9.0 spec/lib/languages/epl2/barcode_1d_spec.rb
zebra_printer-0.8.0 spec/lib/languages/epl2/barcode_1d_spec.rb
zebra_printer-0.1.1 spec/lib/languages/epl2/barcode_1d_spec.rb