Sha256: 26285823aedd7db54edbc6c92762733945f9b881bd1f0a0ec4817bbd44c92e8a

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

process_is_foreground do

  not_supported_on :ironruby do
    require 'readline'
    describe "Readline.completion_proc" do
      it "returns nil" do
        Readline.completion_proc.should be_nil
      end
    end

    describe "Readline.completion_proc=" do
      it "set the proc" do
        proc = Proc.new do |e|
        end
        Readline.completion_proc = proc
        Readline.completion_proc.should == proc
      end

      it "returns an ArgumentError if not fiven an Proc or #call" do
        lambda { Readline.completion_proc = "test" }.should raise_error(ArgumentError)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
readline-ffi-0.0.2 spec/library/readline/completion_proc_spec.rb