Sha256: 873be9d142f0ef1bba506d8503fc7ff653028dbf1c35413065ce7412c53e30d3

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

module ValidData
  describe Printer do
    let(:printer) { Printer.new(5) }

    describe "#print" do
      it "writes each row of the table with the appropriate padding" do
        result = Result.new("User", 5, 20)
        expect(printer.print(result)).to eq "User  | 5     | 20   "
      end
    end

    describe "#header" do
      it "writes the header with the appropriate padding" do
        expect(printer.header).to eq "Model | Invalid | Total\n---------------"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
valid_data-0.0.1 spec/lib/valid_data/printer_spec.rb