blob: d91a3e1adc6b9d39a17c1a0e5dbcb919fa6f4de8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
require File.expand_path('../../../spec_helper', __FILE__)
require 'tempfile'
describe "Tempfile#_close" do
before :each do
@tempfile = Tempfile.new("specs")
end
after :each do
@tempfile.close!
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
|