Sha256: 8c56f1145649cc9c3e951a0d355642a37b95db7fdc2c116b59fb38cdbbac3f1b

Contents?: true

Size: 885 Bytes

Versions: 1

Compression:

Stored size: 885 Bytes

Contents

# encoding: utf-8
require "spec_helper"

describe Lumos::Formatters::Base do

  context "subsidary methods" do
    it "returns number of message characters" do
      expect(described_class.new(message: "Cave Inimicum").message_length).to eq(13)
    end

    it "returns number of short message lines" do
      expect(described_class.new(message: "Colloportus").chopped_message.size).to eq(1)
    end

    it "returns number of long message lines" do
      expect(described_class.new(message: "Coffee has long had a reputation as being unhealthy. But in almost every single respect that reputation is backward. The potential health benefits are surprisingly large.").chopped_message.size).to eq(3)
    end

    it "returns messages size based on lenght of first chopped line" do
      expect(described_class.new(message: "Confringo").chopped_message_length).to eq(9)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lumos-0.0.1 spec/formatters/base_spec.rb