Sha256: 0e33d6c0324ff7ad7de7019f387d0f73ec5f216bf375f8e7925d9ab1e2b7e464

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Shoulda::Matchers::ActiveModel::RequireAValidCnpjMatcher do
  let(:company) { Company.new }

  it 'accepts on cnpj' do
    expect(company).to require_a_valid_cnpj(:cnpj)
  end

  it 'accepts without a specified attribute' do
    expect(company).to require_a_valid_cnpj
  end

  it 'rejects on name' do
    expect(company).not_to require_a_valid_cnpj(:name)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
validates_cnpj-3.1.0 spec/shoulda/matchers/active_model/require_a_valid_cnpj_matcher_spec.rb
validates_cnpj-3.0.0 spec/shoulda/matchers/active_model/require_a_valid_cnpj_matcher_spec.rb