Sha256: 12b20eda18d0227df3b16267dfb5a096ef970be12c913e5907bd1dcff61637bb
Contents?: true
Size: 537 Bytes
Versions: 5
Compression:
Stored size: 537 Bytes
Contents
require 'spec_helper' describe Jan::CodeBody do describe '#calculate_check_digit' do it('generates and returns check digit') do res = described_class.new('490127724112').calculate_check_digit expect(res.class).to eq(Jan::CheckDigit) expect(res).to eq('6') end end describe '#generate_code' do it('generates and returns check digit') do res = described_class.new('490127724112').generate_code expect(res.class).to eq(Jan::Code) expect(res).to eq('4901277241126') end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
jan-0.2.4 | spec/jan/code_body_spec.rb |
jan-0.2.3 | spec/jan/code_body_spec.rb |
jan-0.2.2 | spec/jan/code_body_spec.rb |
jan-0.2.1 | spec/jan/code_body_spec.rb |
jan-0.2.0 | spec/jan/code_body_spec.rb |