1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/Rakefile

37 lines
766 B
Ruby
Raw Normal View History

require 'rake/testtask'
test_files = Dir.glob('test/**/*_test.rb')
2013-07-14 14:51:15 -04:00
desc "Default Task"
2009-09-13 13:42:13 -04:00
task :default => :test
# Run the unit tests
Rake::TestTask.new do |t|
t.libs << 'test'
t.test_files = test_files
2008-09-10 14:03:32 -04:00
t.warning = true
2012-02-03 08:01:24 -05:00
t.verbose = true
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
2008-09-10 14:03:32 -04:00
end
namespace :test do
task :isolated do
2013-07-14 14:51:15 -04:00
test_files.all? do |file|
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end
end
2011-09-22 07:52:52 -04:00
task :lines do
load File.expand_path('..', File.dirname(__FILE__)) + '/tools/line_statistics'
files = FileList["lib/**/*.rb"]
CodeTools::LineStatistics.new(files).print_loc
end
rule '.rb' => '.y' do |t|
sh "racc -l -o #{t.name} #{t.source}"
end
task compile: 'lib/action_dispatch/journey/parser.rb'