move quiz faker to new dev utilities location
This commit is contained in:
parent
3ff03a03ad
commit
c4357055d7
@ -30,5 +30,8 @@ module SkillAssessmentApp
|
|||||||
g.helper false
|
g.helper false
|
||||||
g.routes false
|
g.routes false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# let's use lib/utils for dev only utility classes & helpers
|
||||||
|
config.autoload_paths << "#{Rails.root}/lib/utils"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
namespace :faker do
|
|
||||||
desc "Generates 10 fake candidates with results."
|
|
||||||
task results: :environment do
|
|
||||||
puts "Not for production use" and return if Rails.env == "production"
|
|
||||||
|
|
||||||
faker = FakeQuiz.new
|
|
||||||
faker.create_completed_quizzes 10
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,5 +1,4 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# :nocov:
|
|
||||||
class FakeQuiz
|
class FakeQuiz
|
||||||
def create_completed_quizzes num = 10
|
def create_completed_quizzes num = 10
|
||||||
num.times do
|
num.times do
|
||||||
@ -68,4 +67,3 @@ class FakeQuiz
|
|||||||
end
|
end
|
||||||
end # rubocop:enable Metrics/MethodLength
|
end # rubocop:enable Metrics/MethodLength
|
||||||
end
|
end
|
||||||
# :nocov:
|
|
@ -8,6 +8,8 @@ SimpleCov.start 'rails' do
|
|||||||
add_group 'Services & Workers', %w(app/workers app/services)
|
add_group 'Services & Workers', %w(app/workers app/services)
|
||||||
add_group "Jobs", 'app/jobs'
|
add_group "Jobs", 'app/jobs'
|
||||||
add_group "Policies", 'app/policies'
|
add_group "Policies", 'app/policies'
|
||||||
|
|
||||||
|
add_filter "/lib/utils/" # no need to test dev only utility classes
|
||||||
end
|
end
|
||||||
|
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
require File.expand_path('../../config/environment', __FILE__)
|
||||||
|
Loading…
Reference in New Issue
Block a user