Uses Pathname#join rather than File#join when possible
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user