Skip to content

Commit

Permalink
Process review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Sep 28, 2023
1 parent c890fb0 commit 8363787
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions core/io/autoclose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,36 @@
@io.close unless @io.closed?
end

it "is set to true by default" do
@io.should.autoclose?
end

it "can be set to true" do
@io.autoclose = false
@io.autoclose = true
@io.should.autoclose?
end

it "can be set to false" do
@io.autoclose = true
@io.autoclose = false
@io.should_not.autoclose?
end

it "can be set to any truthy value" do
@io.autoclose = false
@io.autoclose = 42
@io.should.autoclose?

@io.autoclose = false
@io.autoclose = Object.new
@io.should.autoclose?
end

it "can be set to any falsy value" do
@io.autoclose = true
@io.autoclose = nil
@io.should_not.autoclose?
end

it "can be set multple times" do
Expand Down

0 comments on commit 8363787

Please sign in to comment.