test/helper.rb in padrino-gen-0.2.9 vs test/helper.rb in padrino-gen-0.4.5
- old
+ new
@@ -57,9 +57,14 @@
# Asserts that a file matches the pattern
def assert_match_in_file(pattern, file)
File.exist?(file) ? assert_match(pattern, File.read(file)) : assert_file_exists(file)
end
+
+ def assert_no_match_in_file(pattern, file)
+ File.exists?(file) ? !assert_match(pattern, File.read(file)) : assert_file_exists(file)
+ end
+
end
class Object
# Silences the output by redirecting to stringIO
# silence_logger { ...commands... } => "...output..."
\ No newline at end of file