spec/server/static_caching_spec.rb in yard-0.9.5 vs spec/server/static_caching_spec.rb in yard-0.9.6

- old
+ new

@@ -1,8 +1,9 @@ +# frozen_string_literal: true require File.dirname(__FILE__) + '/spec_helper' -describe YARD::Server::StaticCaching do +RSpec.describe YARD::Server::StaticCaching do include StaticCaching describe "#check_static_cache" do def adapter; @adapter ||= mock_adapter end def request; @request ||= MockRequest.new end @@ -14,19 +15,19 @@ it "reads a file from document root if path matches file on system" do request.path_info = '/hello/world.html' expect(File).to receive(:file?).with('/public/hello/world.html').and_return(true) expect(File).to receive(:open).with('/public/hello/world.html', anything).and_return('body') - s, h, b = *check_static_cache + s, _, b = *check_static_cache expect(s).to eq 200 expect(b).to eq ["body"] end it "reads a file if path matches file on system + .html" do request.path_info = '/hello/world' expect(File).to receive(:file?).with('/public/hello/world.html').and_return(true) expect(File).to receive(:open).with('/public/hello/world.html', anything).and_return('body') - s, h, b = *check_static_cache + s, _, b = *check_static_cache expect(s).to eq 200 expect(b).to eq ["body"] end it "returns nil if no matching file is found" do