Sha256: 4aeefad0f45a0f057b867d92cf5ff53093ec5855d0951d3a46416cb5f22daed2
Contents?: true
Size: 986 Bytes
Versions: 3
Compression:
Stored size: 986 Bytes
Contents
require 'spec_helper' module BoletoBancario module Calculos describe Modulo11FatorDe2a7 do context 'with Bradesco documentation example' do subject { Modulo11FatorDe2a7.new('1900000000002') } it { should eq '8' } end context 'with Bradesco example that returns P' do subject { Modulo11FatorDe2a7.new('1900000000001') } it { should eq 'P' } end context 'with Bradesco example that returns zero' do subject { Modulo11FatorDe2a7.new('1900000000006') } it { should eq '0' } end context "when have two digits" do subject { Modulo11FatorDe2a7.new('20') } it { should eq '5' } end context "when have two digits (more examples)" do subject { Modulo11FatorDe2a7.new('26') } it { should eq '4' } end context "more examples" do subject { Modulo11FatorDe2a7.new('64') } it { should eq '7' } end end end end
Version data entries
3 entries across 3 versions & 2 rubygems