test/helper.rb in nanoc-3.5.0 vs test/helper.rb in nanoc-3.6.0
- old
+ new
@@ -87,11 +87,11 @@
File.open('layouts/default.html', 'w') do |io|
io.write('... <%= @yield %> ...')
end
end
- File.open('config.yaml', 'w') { |io| io.write('stuff: 12345') }
+ File.open('nanoc.yaml', 'w') { |io| io.write('stuff: 12345') }
File.open('Rules', 'w') { |io| io.write(rules_content) }
end
end
# Yield site
@@ -196,9 +196,14 @@
index = remaining.index(e)
remaining.delete_at(index) if index
end
assert remaining.empty?,
'Expected %s to contain all the elements of %s' % [actual.inspect, expected.inspect]
+ end
+
+ def assert_raises_frozen_error
+ error = assert_raises(RuntimeError, TypeError) { yield }
+ assert_match(/(^can't modify frozen |^unable to modify frozen object$)/, error.message)
end
end
# Unexpected system exit is unexpected