diff --git a/spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb b/spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb index e3ef3e4557..94201a9b15 100644 --- a/spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb +++ b/spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb @@ -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 diff --git a/spec/ruby/core/exception/exit_value_spec.rb b/spec/ruby/core/exception/exit_value_spec.rb index 8bb3cf898d..99987dd1bc 100644 --- a/spec/ruby/core/exception/exit_value_spec.rb +++ b/spec/ruby/core/exception/exit_value_spec.rb @@ -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 diff --git a/spec/ruby/core/exception/incomplete_input_spec.rb b/spec/ruby/core/exception/incomplete_input_spec.rb deleted file mode 100644 index 930a3f01d5..0000000000 --- a/spec/ruby/core/exception/incomplete_input_spec.rb +++ /dev/null @@ -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 diff --git a/spec/ruby/core/exception/reason_spec.rb b/spec/ruby/core/exception/reason_spec.rb index b28cbde8d9..210bbc9725 100644 --- a/spec/ruby/core/exception/reason_spec.rb +++ b/spec/ruby/core/exception/reason_spec.rb @@ -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 diff --git a/spec/ruby/core/process/wait_spec.rb b/spec/ruby/core/process/wait_spec.rb index f393a99e0f..44c95d6304 100644 --- a/spec/ruby/core/process/wait_spec.rb +++ b/spec/ruby/core/process/wait_spec.rb @@ -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