-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'barby/barcode/ean_13' | ||
|
||
module Barby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'barby/barcode' | ||
|
||
module Barby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'barby/barcode' | ||
|
||
module Barby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'barby/barcode' | ||
|
||
module Barby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'code_128_test' | ||
require 'gs1_128_test' | ||
|
||
require 'code_25_test' | ||
require 'code_25_interleaved_test' | ||
require 'code_25_iata_test' | ||
|
||
require 'code_39_test' | ||
require 'code_93_test' | ||
|
||
require 'ean13_test' | ||
require 'ean8_test' | ||
require 'bookland_test' | ||
require 'upc_supplemental_test' | ||
|
||
require 'data_matrix_test' | ||
require 'qr_code_test' | ||
|
||
#require 'pdf_417_test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'test_helper' | ||
require 'barby/barcode/code_39' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'test_helper' | ||
require 'barby/barcode/code_93' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
unless RUBY_VERSION >= '1.9' | ||
require 'test_helper' | ||
require 'barby/barcode/data_matrix' | ||
|
||
require 'test_helper' | ||
require 'barby/barcode/data_matrix' | ||
class DataMatrixTest < Barby::TestCase | ||
|
||
class DataMatrixTest < Barby::TestCase | ||
|
||
before do | ||
@data = "humbaba" | ||
@code = Barby::DataMatrix.new(@data) | ||
end | ||
|
||
it "should have the expected encoding" do | ||
@code.encoding.must_equal ["1010101010101010", "1011111000011111", "1110111000010100", | ||
"1110100100000111", "1101111010101000", "1101111011110011", | ||
"1111111100000100", "1100101111110001", "1001000010001010", | ||
"1101010110111011", "1000000100011110", "1001010010000011", | ||
"1101100111011110", "1110111010000101", "1110010110001010", | ||
"1111111111111111"] | ||
end | ||
before do | ||
@data = "humbaba" | ||
@code = Barby::DataMatrix.new(@data) | ||
end | ||
|
||
it "should return data on to_s" do | ||
@code.to_s.must_equal @data | ||
end | ||
it "should have the expected encoding" do | ||
@code.encoding.must_equal ["1010101010101010", "1011111000011111", "1110111000010100", | ||
"1110100100000111", "1101111010101000", "1101111011110011", | ||
"1111111100000100", "1100101111110001", "1001000010001010", | ||
"1101010110111011", "1000000100011110", "1001010010000011", | ||
"1101100111011110", "1110111010000101", "1110010110001010", | ||
"1111111111111111"] | ||
end | ||
|
||
it "should be able to change its data" do | ||
prev_encoding = @code.encoding | ||
@code.data = "after eight" | ||
@code.encoding.wont_equal prev_encoding | ||
end | ||
it "should return data on to_s" do | ||
@code.to_s.must_equal @data | ||
end | ||
|
||
it "should be able to change its data" do | ||
prev_encoding = @code.encoding | ||
@code.data = "after eight" | ||
@code.encoding.wont_equal prev_encoding | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#encoding: ASCII | ||
require 'test_helper' | ||
require 'barby/barcode/gs1_128' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters