blob: c08f425b6f39e9d8a6aaf01027ff357e4a871885 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
require_relative '../../spec_helper'
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
|