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
|
# File 'lib/racatt.rb', line 20
def self.create_tasks
current_scope = Rake.application.current_scope.path
namespace 'cucumber' do
desc 'Run all of the Cucumber features'
task :features, [:command_options] do |_t, args|
set_cucumber_options(combine_options('-t ~@wip -t ~@off', args[:command_options]))
end
Cucumber::Rake::Task.new(:features)
end
namespace 'rspec' do
desc 'Run all of the RSpec specifications'
RSpec::Core::RakeTask.new(:specs, :command_options) do |t, args|
t.rspec_opts = "-t ~wip -t ~off "
t.rspec_opts << args[:command_options] if args[:command_options]
end
end
desc 'Test All The Things!'
task :test_everything, [:command_options] => [:clear_coverage] do |_t, args|
Rake::Task["#{current_scope}:rspec:specs"].invoke(args[:command_options])
Rake::Task["#{current_scope}:cucumber:features"].invoke(args[:command_options])
end
end
|