Sha256: 03064b4619681935839eac39119c5d707cd52ca1068fe5d2df5ca7ef7a4a9f40

Contents?: true

Size: 658 Bytes

Versions: 10

Compression:

Stored size: 658 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, hide_cursor: 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

10 entries across 10 versions & 1 rubygems

Version Path
tp-0.7.0 spec/lib/tp/presenter_spec.rb
tp-0.7.0pre2 spec/lib/tp/presenter_spec.rb
tp-0.7.0pre1 spec/lib/tp/presenter_spec.rb
tp-0.6.2 spec/lib/tp/presenter_spec.rb
tp-0.6.2pre2 spec/lib/tp/presenter_spec.rb
tp-0.6.2pre1 spec/lib/tp/presenter_spec.rb
tp-0.6.1 spec/lib/tp/presenter_spec.rb
tp-0.6.0 spec/lib/tp/presenter_spec.rb
tp-0.5.1 spec/lib/tp/presenter_spec.rb
tp-0.5.0 spec/lib/tp/presenter_spec.rb