mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@7241f39
This commit is contained in:
parent
74fdc1e60f
commit
c74d30e795
5 changed files with 13 additions and 16 deletions
|
@ -2,7 +2,6 @@
|
|||
require_relative '../../../spec_helper'
|
||||
|
||||
describe "Encoding::InvalidByteSequenceError#incomplete_input?" do
|
||||
|
||||
it "returns nil by default" do
|
||||
Encoding::InvalidByteSequenceError.new.incomplete_input?.should be_nil
|
||||
end
|
||||
|
|
|
@ -4,7 +4,10 @@ describe "LocalJumpError#exit_value" do
|
|||
def get_me_a_return
|
||||
Proc.new { return 42 }
|
||||
end
|
||||
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
|
||||
e.exit_value.should == 42
|
||||
}
|
||||
|
||||
it "returns the value given to return" do
|
||||
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
|
||||
e.exit_value.should == 42
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Encoding::InvalidByteSequenceError#incomplete_input?" do
|
||||
-> {"abc\xa4def".encode("ISO-8859-1", "EUC-JP") }.should raise_error(Encoding::InvalidByteSequenceError) { |e|
|
||||
e.incomplete_input?.should == false
|
||||
}
|
||||
end
|
|
@ -4,7 +4,10 @@ describe "LocalJumpError#reason" do
|
|||
def get_me_a_return
|
||||
Proc.new { return 42 }
|
||||
end
|
||||
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
|
||||
e.reason.should == :return
|
||||
}
|
||||
|
||||
it "returns 'return' for a return" do
|
||||
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
|
||||
e.reason.should == :return
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,9 +7,8 @@ describe "Process.wait" do
|
|||
before :all do
|
||||
begin
|
||||
leaked = Process.waitall
|
||||
puts "leaked before wait specs: #{leaked}" unless leaked.empty?
|
||||
# Ruby-space should not see PIDs used by mjit
|
||||
leaked.should be_empty
|
||||
raise "subprocesses leaked before wait specs: #{leaked}" unless leaked.empty?
|
||||
rescue NotImplementedError
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue