Skip to content

Commit

Permalink
Make internal methods private
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 4, 2014
1 parent adc658a commit 1218f6c
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions test/test-file-content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ def setup
@file = Tempfile.new(["test-file-content", ".txt"])
end

def write(string)
@file.write(string)
@file.flush
end

def content(string=nil)
write(string) if string
ChupaText::FileContent.new(@file.path)
end

def test_size
body = "Hello"
assert_equal(body.bytesize, content(body).size)
Expand All @@ -47,4 +37,15 @@ def test_open
body = "Hello"
assert_equal(body, content(body).open {|file| file.read})
end

private
def write(string)
@file.write(string)
@file.flush
end

def content(string=nil)
write(string) if string
ChupaText::FileContent.new(@file.path)
end
end

0 comments on commit 1218f6c

Please sign in to comment.