Sha256: 60a985a461cc807dd7e0dcbe8d7ef1944b5d4f5fb1841eb3155f54f387007142

Contents?: true

Size: 356 Bytes

Versions: 6

Compression:

Stored size: 356 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Terminal, '#echo' do
  let(:instance) { described_class.new }

  subject { instance.echo(&block) }

  context 'without block' do
    let(:block) { }

    it { is_expected.to be_nil }
  end

  context 'with empty block' do
    let(:block) { lambda { '' } }

    it { is_expected.to eq('') }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tty-0.2.1 spec/tty/terminal/echo_spec.rb
tty-0.2.0 spec/tty/terminal/echo_spec.rb
tty-0.1.3 spec/tty/terminal/echo_spec.rb
tty-0.1.2 spec/tty/terminal/echo_spec.rb
tty-0.1.1 spec/tty/terminal/echo_spec.rb
tty-0.1.0 spec/tty/terminal/echo_spec.rb