Sha256: 29d9dd5c1f52211453195f497959875043e7d611067eadf65e9de3e44d058a6a

Contents?: true

Size: 640 Bytes

Versions: 4

Compression:

Stored size: 640 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.

      #

      Blank header
    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(7).times

      presenter.present
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tp-0.4.1 spec/lib/tp/presenter_spec.rb
tp-0.4.0 spec/lib/tp/presenter_spec.rb
tp-0.3.1 spec/lib/tp/presenter_spec.rb
tp-0.3.0 spec/lib/tp/presenter_spec.rb