From 8cbb725856938c627741d25bb3622a829b8d5a4a Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 9 Dec 2018 05:36:11 +0500 Subject: [PATCH] Fix code style --- .rubocop.yml | 1 - features/support/env.rb | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 1a342c0..9ab3267 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,6 @@ AllCops: Exclude: - 'bin/**/*' - 'db/schema.rb' - - 'features/support/env.rb' - 'lib/tasks/cucumber.rake' - 'lib/templates/**/*' - 'script/cucumber' diff --git a/features/support/env.rb b/features/support/env.rb index 79077d3..0e38d7f 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,13 +1,15 @@ +# frozen_string_literal: true + +# This should be on the top of the file. +$coverage = true +require 'simplecov' + # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. # It is recommended to regenerate this file in the future when you upgrade to a # newer version of cucumber-rails. Consider adding your own code to a new file # instead of editing this one. Cucumber will automatically load all features/**/*.rb # files. -# This should be on the top of the file. -$coverage = true -require 'simplecov' - require 'cucumber/rails' require 'capybara-screenshot/cucumber' @@ -41,7 +43,7 @@ ActionController::Base.allow_rescue = false begin DatabaseCleaner.strategy = :transaction rescue NameError - raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." + raise 'You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it.' end # You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios. @@ -63,4 +65,3 @@ end # The :transaction strategy is faster, but might give you threading problems. # See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature Cucumber::Rails::Database.javascript_strategy = :truncation -