-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (29 loc) · 747 Bytes
/
Rakefile
File metadata and controls
34 lines (29 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*-ruby-*-
require 'rake'
require 'rspec/core/rake_task'
require "bundler/gem_tasks"
desc 'Runs all development tests'
task :test
task :test => [:syntax]
desc 'Checks ruby files for syntax errors'
task :syntax do |t|
puts '------------Syntax-----------'
Dir.glob('**/*.rb').each do |f|
system("/bin/echo -n '#{f}: '; ruby -c #{f}")
end
end
# Rubocop
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:lint) do |task|
task.options = ['-c', 'rubocop.yaml']
end
rescue LoadError
puts 'rubocop is not available. Install the rubocop gem to run the lint tests.'
end
task :test => [:unit]
desc 'Runs unit tests'
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = 'test/unit/**/*_spec.rb'
t.rspec_opts = '-fd'
end