Sha256: 38888f244e5d89f5c029f5867462092f087c2d2dc14c47fa3c6fe6a38dcba657

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

describe TP::Presenter do
  subject(:presenter) { klass.new markdown }

  let(:markdown) {
    <<-MD.gsub(/^ {6}/, '')
      # Header by itself

      # Bullets

      * Bullet 1
      * Bullet 2

      # Paragraph

      This is a really long paragraph. Kinda.
    MD
  }

  before :each do
    Screen.stub width: 20, height: 20
  end

  describe "#present" do
    it "works" do
      Keyboard.should_receive(:wait_for_enter).exactly(3).times
      Screen.should_receive(:clear!).exactly(4).times

      presenter.should_receive(:print).exactly(3).times

      presenter.present
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tp-0.0.2 spec/lib/tp/presenter_spec.rb