Skip to content

Commit

Permalink
Updates rubocop-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanlr committed Sep 7, 2020
1 parent e2d616a commit c1e278e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion spec/app/controllers/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@
%i[apache iis nginx].each do |server|
context "when #{server}" do
let(:cli_args) { "#{super()} --server #{server}" }
let(:servers) { [:Apache, nil, :IIS, :Nginx] }

it "loads the #{server.capitalize} module and returns :#{server}" do
@stubbed_server = [:Apache, nil, :IIS, :Nginx].sample
@stubbed_server = servers.sample
@expected = server == :iis ? :IIS : server.to_s.camelize.to_sym
end
end
Expand Down
4 changes: 3 additions & 1 deletion spec/lib/target_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@

%i[wp_version main_theme plugins themes timthumbs config_backups db_exports medias users].each do |method|
describe "##{method}" do
let(:methods) { %i[wp_version main_theme] }

before do
return_value = %i[wp_version main_theme].include?(method) ? false : []
return_value = methods.include?(method) ? false : []

expect(WPScan::Finders.const_get("#{method.to_s.camelize}::Base"))
.to receive(:find).with(target, opts).and_return(return_value)
Expand Down
2 changes: 1 addition & 1 deletion wpscan.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec', '~> 3.9.0'
s.add_development_dependency 'rspec-its', '~> 1.3.0'
s.add_development_dependency 'rubocop', '~> 0.90.0'
s.add_development_dependency 'rubocop-performance', '~> 1.7.0'
s.add_development_dependency 'rubocop-performance', '~> 1.8.0'
s.add_development_dependency 'simplecov', '~> 0.19.0'
s.add_development_dependency 'simplecov-lcov', '~> 0.8.0'
s.add_development_dependency 'stackprof', '~> 0.2.12'
Expand Down

0 comments on commit c1e278e

Please sign in to comment.