Sha256: 89f2e16034a9e2f9f4c21e71393a39143b0fd8e8f9634109ecea22f1af7be582

Contents?: true

Size: 417 Bytes

Versions: 3

Compression:

Stored size: 417 Bytes

Contents

require File.expand_path('../fixtures/common', __FILE__)
require 'tempfile'

describe "Tempfile#_close" do
  before :each do
    @tempfile = Tempfile.new("specs")
  end

  after :each do
    TempfileSpecs.cleanup @tempfile
  end

  it "is protected" do
    Tempfile.should have_protected_instance_method(:_close)
  end

  it "closes self" do
    @tempfile.send(:_close)
    @tempfile.closed?.should be_true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-tempfile-2.0.1 spec/_close_spec.rb
rubysl-tempfile-1.0.0 spec/_close_spec.rb
rubysl-tempfile-2.0.0 spec/_close_spec.rb