Sha256: 85c37c1f3cbb80050bbf53a53bcab6f6da17b2a3e114a3e3afae2317066e93d1

Contents?: true

Size: 487 Bytes

Versions: 28

Compression:

Stored size: 487 Bytes

Contents

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

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

  should '#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
  behaves_like :rib

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

  test_for Rib::Readline do
    behaves_like :readline
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rib-1.2.5 test/core/test_readline.rb
rib-1.2.4 test/core/test_readline.rb
rib-1.2.3 test/core/test_readline.rb
rib-1.2.2 test/core/test_readline.rb
rib-1.2.1 test/core/test_readline.rb
rib-1.2.0 test/core/test_readline.rb
rib-1.1.6 test/core/test_readline.rb
rib-1.1.5 test/core/test_readline.rb
rib-1.1.4 test/core/test_readline.rb
rib-1.1.3 test/core/test_readline.rb
rib-1.1.2 test/core/test_readline.rb
rib-1.1.1 test/core/test_readline.rb
rib-1.1.0 test/core/test_readline.rb
rib-1.0.5 test/core/test_readline.rb
rib-1.0.4 test/core/test_readline.rb
rib-1.0.3 test/core/test_readline.rb
rib-1.0.2 test/core/test_readline.rb
rib-1.0.1 test/core/test_readline.rb
rib-1.0.0 test/core/test_readline.rb
rib-0.9.9 test/core/test_readline.rb