test/extra/test_auto_compiler.rb in nanoc-3.4.2 vs test/extra/test_auto_compiler.rb in nanoc-3.4.3

- old
+ new

@@ -57,11 +57,11 @@ autocompiler = Nanoc::Extra::AutoCompiler.new('.') autocompiler.stubs(:build_site) autocompiler.stubs(:site).returns(site) # Serve - status, headers, body = autocompiler.instance_eval { call('REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/afjwiagoawf.html') } + status, _, _ = autocompiler.instance_eval { call('REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/afjwiagoawf.html') } # Check response assert_equal(404, status) end end @@ -375,11 +375,11 @@ File.utime(Time.now+5, Time.now+5, 'config.yaml') # Check status, headers, body = autocompiler.call('REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/') body.each do |b| - assert_match /The Grand Value of Configuration is Foo!/, b + assert_match(/The Grand Value of Configuration is Foo!/, b) end # Set config to 2nd value File.open('config.yaml', 'w') do |io| io.write "value: Bar" @@ -387,11 +387,11 @@ File.utime(Time.now+5, Time.now+5, 'config.yaml') # Check status, headers, body = autocompiler.call('REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/') body.each do |b| - assert_match /The Grand Value of Configuration is Bar!/, b + assert_match(/The Grand Value of Configuration is Bar!/, b) end end end end @@ -408,10 +408,10 @@ autocompiler.stubs(:site).returns(site) # Test result = autocompiler.call('REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/%73oftware') assert_equal 404, result[0] - assert_match "File not found: /software\n", result[2][0] + assert_match("File not found: /software\n", result[2][0]) end end end