Removed some unecessary comments

This commit is contained in:
filipefurtad0
2021-07-21 16:25:20 +01:00
parent ecbab52f06
commit df7f4d0a31
2 changed files with 0 additions and 46 deletions

View File

@@ -14,12 +14,6 @@ module BetterRailsSystemTests
Capybara.using_session(Capybara.last_used_session) { super }
end
## Use relative path in screenshot message
##def image_path
## absolute_image_path.relative_path_from(Rails.root).to_s
##end
end
RSpec.configure do |config|

View File

@@ -22,44 +22,4 @@ RSpec.configure do |config|
end
end
=begin
# frozen_string_literal: true
# Precompile assets before running tests to avoid timeouts.
# Do not precompile if webpack-dev-server is running (NOTE: MUST be launched with RAILS_ENV=test)
RSpec.configure do |config|
config.before(:suite) do
examples = RSpec.world.filtered_examples.values.flatten
has_no_system_tests = examples.none? { |example| example.metadata[:type] == :system }
if has_no_system_tests
$stdout.puts "\n🚀 No system test selected. Skip assets compilation.\n"
next
end
if Webpacker.dev_server.running?
$stdout.puts "\n⚙ Webpack dev server is running! Skip assets compilation.\n"
next
else
$stdout.puts "\n🐢 Precompiling assets.\n"
original_stdout = $stdout.clone
# Use test-prof now 'cause it couldn't be monkey-patched (e.g., by Timecop or similar)
start = Time.current
begin
# Silence Webpacker output
$stdout.reopen(File.new("/dev/null", "w"))
# next 3 lines to compile webpacker before running our test suite
require "rake"
Rails.application.load_tasks
Rake::Task["webpacker:compile"].execute
ensure
$stdout.reopen(original_stdout)
$stdout.puts "Finished in #{(Time.current - start).round(2)} seconds"
end
end
end
end
=end