Class: KalibroClient::Rake::TestTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- KalibroClient::Rake::TestTask
- Defined in:
- lib/rake/test_task.rb
Instance Method Summary collapse
-
#initialize ⇒ TestTask
constructor
A new instance of TestTask.
Constructor Details
#initialize ⇒ TestTask
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/rake/test_task.rb', line 27 def initialize namespace :test do desc 'Runs acceptance and unit tests' task :all => [:units, :acceptance] desc 'Runs the unit tests' task :units do unit_tests_command = "bundle exec rspec spec" puts "Running the unit tests with \"#{unit_tests_command}\"\n\n" system unit_tests_command end desc 'Runs the acceptance tests' task :acceptance, [:feature] do |t, args| if args.feature.nil? acceptance_tests_command = "bundle exec cucumber" else acceptance_tests_command = "bundle exec cucumber #{args.feature} features/step_definitions/ features/support/" end puts "Running the acceptance tests with \"#{acceptance_tests_command}\"\n\n" system acceptance_tests_command end desc 'Runs the performance tests' task :performance do |t, args| performance_tests_command = "bundle exec ruby performance/tests/*" puts "Running the acceptance tests with \"#{performance_tests_command}\"\n\n" system performance_tests_command end end end |