Enable RSpec/HookArgument cop and fix issues

To be consistent about before/after arguments, as `:each` or `:example`
 are same and default scopes, best not to send an argument in those
 scenarios.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
This commit is contained in:
Bertocq
2018-01-07 02:07:19 +01:00
parent 39b01b6342
commit 1441de5107
25 changed files with 46 additions and 43 deletions

View File

@@ -16,7 +16,7 @@ describe Admin::Api::StatsController do
end
context 'events present' do
before :each do
before do
time_1 = DateTime.parse("2015-01-01").in_time_zone
time_2 = DateTime.parse("2015-01-02").in_time_zone
time_3 = DateTime.parse("2015-01-03").in_time_zone