Sha256: deec2786fec179be2e80597062d226b5a7b581babb6e386acb1dfe4bbc4aa28a

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

require 'spec_helper'

describe Languages::Epl2::Font do
  context "#font_size :normal" do
    subject { Languages::Epl2::Font.new :size => :normal}
    its(:name) { should eq 2 }
    its(:rotation) { should eq 0 }
    its(:height) { should eq 1 }
    its(:width) { should eq 1 }    
  end
  context "#font_size :small" do
    subject { Languages::Epl2::Font.new :size => :small}
    its(:name) { should eq 1 }
    its(:rotation) { should eq 0 }
    its(:height) { should eq 1 }
    its(:width) { should eq 1 }    
  end
  context "#font_size :large" do
    subject { Languages::Epl2::Font.new :size => :large}
    its(:name) { should eq 3 }
    its(:rotation) { should eq 0 }
    its(:height) { should eq 1 }
    its(:width) { should eq 1 }    
  end
  context "#font_size :x_large" do
    subject { Languages::Epl2::Font.new :size => :x_large}
    its(:name) { should eq 4 }
    its(:rotation) { should eq 0 }
    its(:height) { should eq 1 }
    its(:width) { should eq 1 }    
  end

  context "#font_rotation" do
    let(:font) { Languages::Epl2::Font.new }
    it ":by_90" do
      expect(font.font_rotation(:by_90)).to eq 1
    end
    it ":by_180" do
      expect(font.font_rotation(:by_180)).to eq 2
    end
    it ":by_270" do
      expect(font.font_rotation(:by_270)).to eq 3
    end
    it ":by_0" do
      expect(font.font_rotation(:by_0)).to eq 0
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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