Sha256: b97bc95fea72c752aefc707ff3f6f5fa3dd7b4b72b1d3dbec2475f239e05bcbb

Contents?: true

Size: 475 Bytes

Versions: 9

Compression:

Stored size: 475 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

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

    paste :readline
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rib-1.5.1 test/core/test_readline.rb
rib-1.5.0 test/core/test_readline.rb
rib-1.4.0 test/core/test_readline.rb
rib-1.3.1 test/core/test_readline.rb
rib-1.3.0 test/core/test_readline.rb
rib-1.2.91 test/core/test_readline.rb
rib-1.2.9 test/core/test_readline.rb
rib-1.2.8 test/core/test_readline.rb
rib-1.2.7 test/core/test_readline.rb