Skip to content

Commit 24900dd

Browse files
committed
Add task for tests and rdoc generation
1 parent 2925f98 commit 24900dd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Rakefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,25 @@ load "rails/tasks/engine.rake"
66
load "rails/tasks/statistics.rake"
77

88
require "bundler/gem_tasks"
9+
10+
require 'rdoc/task'
11+
12+
desc 'Generate documentation for Todoro.'
13+
Rake::RDocTask.new(:rdoc) do |rdoc|
14+
rdoc.rdoc_dir = 'rdoc'
15+
rdoc.title = 'Todoro'
16+
rdoc.options << '--line-numbers' << '--inline-source'
17+
rdoc.rdoc_files.include('README.md')
18+
rdoc.rdoc_files.include('lib/**/*.rb')
19+
end
20+
21+
require 'rspec/core/rake_task'
22+
23+
# Define the "spec" task, at task load time rather than inside another task
24+
RSpec::Core::RakeTask.new(:spec)
25+
26+
desc 'Run all tests'
27+
task all_tests: :environment do
28+
ENV['RUN_ALL_TESTS'] = 'true'
29+
Rake::Task['spec'].invoke
30+
end

0 commit comments

Comments
 (0)