Skip to content

Commit

Permalink
Fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Feb 26, 2016
1 parent c36fb0d commit 34e2ac7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/dotenv/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
# but rspec does not include the same hacks.
#
# See https://github.com/bkeepers/dotenv/issues/219
if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^spec(:|$)/).any?
Rails.env = ENV['RAILS_ENV'] ||= 'test'
if defined?(Rake.application)
is_running_specs = Rake.application.top_level_tasks.grep(/^spec(:|$)/).any?
Rails.env = ENV["RAILS_ENV"] ||= "test" if is_running_specs
end

Dotenv.instrumenter = ActiveSupport::Notifications
Expand Down

0 comments on commit 34e2ac7

Please sign in to comment.