Sha256: 344d148221d31354b73d2a1f2adae15aacd048905c4a18c08f3c588a60a1e484

Contents?: true

Size: 587 Bytes

Versions: 9

Compression:

Stored size: 587 Bytes

Contents

require 'spec_helper'
require 'paratrooper/notifiers/screen_notifier'
require 'stringio'

describe Paratrooper::Notifiers::ScreenNotifier do
  let(:formatter) { described_class.new(output_stub) }
  let(:output_stub) { StringIO.new }

  describe "#display(message)" do
    it "outputs _message_ to screen" do
      expected_output = <<-EXPECTED_OUTPUT.gsub(/^ {8}/, '')

        #{'=' * 80}
        >> MESSAGE
        #{'=' * 80}

      EXPECTED_OUTPUT

      formatter.display('MESSAGE')
      output_stub.seek(0)

      expect(output_stub.read).to eq(expected_output)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
paratrooper-2.0.0.beta1 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.4.2 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.4.1 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.4.0 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.3.2 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.3.1 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.2.2 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.2.1 spec/paratrooper/notifiers/screen_notifier_spec.rb
paratrooper-1.2.0 spec/paratrooper/notifiers/screen_notifier_spec.rb