Sha256: bb8c0e1a2ef87a7d3a420c1fcf57af3236f80eaea9e9eb0c267564f9e01d541e

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

require 'rib/test'
require 'rib/core/readline'

copy :readline do
  would '#before_loop set @history' do
    @shell.history.should.eq Readline::HISTORY
  end

  would '#get_input calling Readline.readline' do
    mock(Readline).readline(@shell.prompt, true){'ok'}
    @shell.get_input.should.eq 'ok'
  end
end

describe Rib::Readline do
  paste :rib

  before do
    @shell = Rib::Shell.new.before_loop
  end

  test_for Rib::Readline do
    paste :readline
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rib-1.2.6 test/core/test_readline.rb