summaryrefslogtreecommitdiff
path: root/spec/ruby/library/expect/expect_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/expect/expect_spec.rb')
-rw-r--r--spec/ruby/library/expect/expect_spec.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/ruby/library/expect/expect_spec.rb b/spec/ruby/library/expect/expect_spec.rb
index 080f3d7af4..ba705c5535 100644
--- a/spec/ruby/library/expect/expect_spec.rb
+++ b/spec/ruby/library/expect/expect_spec.rb
@@ -1,5 +1,6 @@
+require_relative '../../spec_helper'
+
platform_is_not :windows do
- require File.expand_path('../../../spec_helper', __FILE__)
require 'expect'
describe "IO#expect" do
@@ -37,16 +38,16 @@ platform_is_not :windows do
@write << "prompt> hello"
@read.close
- lambda {
+ -> {
@read.expect("hello")
- }.should raise_error(IOError)
+ }.should.raise(IOError)
end
it "returns nil if eof is hit" do
@write << "pro"
@write.close
- @read.expect("prompt").should be_nil
+ @read.expect("prompt").should == nil
end
it "yields the result if a block is given" do