Sha256: 23abf4cb729ae2438abdca60666a7e5c21ae4741a06bc169eba07619a1b935fa

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

shared_examples_for "validation" do
  it "fails when providing Invalid number" do
    capture_exit(1) do
      described_class.new([switch, "invalid"], stdin, stdout, stderr).start
    end

    expect(stderr).to include("Error: Invalid number")
  end

  it "fails when not providing a number" do
    capture_exit(1) do
      described_class.new([switch], stdin, stdout, stderr).start
    end

    expect(stderr).to include("Error: Invalid number")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cpf_cnpj-0.2.1 spec/support/validation_shared.rb
cpf_cnpj-0.2.0 spec/support/validation_shared.rb
cpf_cnpj-0.1.0 spec/support/validation_shared.rb