mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
Load tasks only in test env
This commit is contained in:
parent
93e9e65a3d
commit
74b9ec11f0
1
Rakefile
1
Rakefile
@ -1,4 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Dir.glob('lib/tasks/*.rake').each { |r| import r }
|
||||
task default: %w(db:migrate rates:load test rubocop)
|
||||
|
@ -1,5 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rubocop/rake_task'
|
||||
|
||||
RuboCop::RakeTask.new
|
@ -1,9 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
return unless ENV['RACK_ENV'] == 'test'
|
||||
|
||||
require 'rake/testtask'
|
||||
require 'rubocop/rake_task'
|
||||
|
||||
Rake::TestTask.new(test: :environment) do |t|
|
||||
t.libs.push('lib')
|
||||
t.test_files = FileList['spec/*_spec.rb']
|
||||
t.ruby_opts += ['-W0']
|
||||
end
|
||||
|
||||
RuboCop::RakeTask.new
|
||||
|
||||
task default: %w(db:migrate rates:load test rubocop)
|
||||
|
Loading…
Reference in New Issue
Block a user