Skip to content

Commit fc6a499

Browse files
committed
Add helper methods file_must_exist, file_wont_exist
1 parent d03e60d commit fc6a499

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/helper.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,13 @@ def linter_output
3737

3838
stdout
3939
end
40+
41+
def file_must_exist(filename)
42+
assert File.exist?(filename),
43+
"Expected file `#{filename}' to exist."
44+
end
45+
46+
def file_wont_exist(filename)
47+
assert !File.exist?(filename),
48+
"Expected file `#{filename}' to not exist."
49+
end

0 commit comments

Comments
 (0)