Skip to content

Commit

Permalink
fix spec to properly handle the expected returns from #readlines
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed Oct 4, 2015
1 parent 2b648e9 commit 0a18f68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/ruby/core/io/readlines_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@
it "gets data from a fork when passed -" do
lines = IO.readlines("|-")

if lines # parent
if !lines.empty? # parent, #readlines always returns an array
lines.should == ["hello\n", "from a fork\n"]
else
elsif lines.empty?
puts "hello"
puts "from a fork"
exit!
Expand Down

0 comments on commit 0a18f68

Please sign in to comment.