Sha256: a3fa6365b75c1eeef21f77a71e50527611950298a2e65ae55a2a0347e93cab94

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 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
    Keyboard.stub read: :return
    Screen.stub width: 20, height: 20, suggest: nil
  end

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

      presenter.present
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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