mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Make sure samples.json is present before running tests
This commit is contained in:
9
Rakefile
9
Rakefile
@@ -6,8 +6,17 @@ require 'pry'
|
||||
|
||||
task :default => :test
|
||||
|
||||
Rake::Task["test"].enhance [:check_samples]
|
||||
|
||||
Rake::TestTask.new
|
||||
|
||||
desc "Check that we have samples.json generated"
|
||||
task :check_samples do
|
||||
unless File.exist?('lib/linguist/samples.json')
|
||||
Rake::Task[:samples].invoke
|
||||
end
|
||||
end
|
||||
|
||||
task :samples do
|
||||
require 'linguist/samples'
|
||||
require 'yajl'
|
||||
|
||||
Reference in New Issue
Block a user