forked from eadz/typus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (40 loc) · 1.32 KB
/
Rakefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require_relative "test/dummy/config/environment"
begin
require 'bundler/setup'
require 'bundler/gem_tasks'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
begin
require 'rdoc/task'
rescue LoadError
require 'rdoc/rdoc'
require 'rake/rdoctask'
RDoc::Task = Rake::RDocTask
end
require 'rake/testtask'
desc "alias for test:all"
task :default => :"test:all"
namespace :test do
Rake::TestTask.new("without_features") do |t|
t.description = "run all tests except the features"
t.libs += %w(lib test)
t.test_files = FileList['test/**/*_test.rb'] - FileList['test/features/**/*_test.rb']
end
Rake::TestTask.new("features") do |t|
t.description = "run feature tests, which use a headless browser"
t.libs += %w(lib test)
t.test_files = FileList['test/features/**/*_test.rb']
end
# right now it is better to run without_features and features separately since they need
# a different test setup (feature specs ran with SQLite require use_transactional_fixtures to be
# to prevent db file locking issues).
task all: [:without_features, :features]
end
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Typus'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end