Uses Pathname#join rather than File#join when possible

This commit is contained in:
erwanlr
2019-02-11 19:30:49 +00:00
parent cdc1dab4a6
commit 7a0f98b2cb
64 changed files with 118 additions and 118 deletions

View File

@@ -1,7 +1,7 @@
describe 'App::Views' do
let(:target_url) { 'http://ex.lo/' }
let(:target) { WPScan::Target.new(target_url) }
let(:fixtures) { File.join(SPECS, 'output') }
let(:fixtures) { SPECS.join('output') }
# CliNoColour is used to test the CLI output to avoid the painful colours
# in the expected output.
@@ -23,7 +23,7 @@ describe 'App::Views' do
view_filename = defined?(expected_view) ? expected_view : view
view_filename = "#{view_filename}.#{formatter.to_s.underscore.downcase}"
controller_dir = controller.class.to_s.demodulize.underscore.downcase
expected_output = File.read(File.join(fixtures, controller_dir, view_filename))
expected_output = File.read(fixtures.join(controller_dir, view_filename))
expect($stdout).to receive(:puts).with(expected_output)