Sha256: 6dee9708d0cc420c8d3ceb6a778e473074ab62ea628af461f44a4d0241d46139

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe CnsBrazil::Generator do
  describe '.block_number' do
    it 'expect legth be 11' do
      generator = described_class.new

      expect(generator.block.length).to eq(11)
    end
  end

  describe '.get' do
    it 'expect legth be 11 15 times' do
      generator = described_class.new

      15.times { expect(generator.call.length).to eq(15) }
    end
  end

  describe '.call' do
    it 'be valid 15 times' do
      15.times do
        generator = described_class.new
        validator = CnsBrazil::Cns.new(value: generator.call)

        expect(validator).to be_valid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cns_brazil-1.0.4 spec/cns_brazil/generator_spec.rb