Sha256: 75cd4bc54bf24fe6423ce0d214a681c6c8baaadc819e1589dea841a5add28873

Contents?: true

Size: 808 Bytes

Versions: 7

Compression:

Stored size: 808 Bytes

Contents

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

module Imb

  describe BarSymbol do

    subject {BarSymbol.make(ascender_bit, descender_bit)}

    context 'tracker' do
      let(:ascender_bit) {0}
      let(:descender_bit) {0}
      its(:code) {should eq 0}
      its(:letter) {should eq 'T'}
    end

    context 'descender' do
      let(:ascender_bit) {0}
      let(:descender_bit) {1}
      its(:code) {should eq 1}
      its(:letter) {should eq 'D'}
    end

    context 'ascender' do
      let(:ascender_bit) {1}
      let(:descender_bit) {0}
      its(:code) {should eq 2}
      its(:letter) {should eq 'A'}
    end

    context 'full' do
      let(:ascender_bit) {1}
      let(:descender_bit) {1}
      its(:code) {should eq 3}
      its(:letter) {should eq 'F'}
    end

  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
usps_intelligent_barcode-1.0.0 spec/bar_symbol_spec.rb
usps_intelligent_barcode-0.3.1 spec/bar_symbol_spec.rb
USPS-intelligent-barcode-0.2.7 spec/bar_symbol_spec.rb
USPS-intelligent-barcode-0.2.6 spec/bar_symbol_spec.rb
usps_intelligent_barcode-0.3.0 spec/bar_symbol_spec.rb
USPS-intelligent-barcode-0.2.5 spec/bar_symbol_spec.rb
USPS-intelligent-barcode-0.2.4 spec/bar_symbol_spec.rb