Rakefile in pacto-0.2.5 vs Rakefile in pacto-0.3.0.pre
- old
+ new
@@ -1,16 +1,29 @@
-require "bundler/gem_tasks"
+require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
+require 'pacto/rake_task'
+require 'cucumber'
+require 'cucumber/rake/task'
+require 'coveralls/rake/task'
+require 'rubocop/rake_task'
-if defined?(RSpec)
- desc "Run unit tests"
- task :unit do
- abort unless system('rspec --option .rspec_unit')
- end
+Coveralls::RakeTask.new
- desc "Run integration tests"
- task :integration do
- abort unless system('rspec --option .rspec_integration')
- end
+Rubocop::RakeTask.new(:rubocop) do |task|
+ task.patterns = ['**/*.rb', 'Rakefile']
+ # abort rake on failure
+ task.fail_on_error = false
+end
- task :default => [:unit, :integration]
+Cucumber::Rake::Task.new(:journeys) do |t|
+ t.cucumber_opts = 'features --format pretty'
end
+
+RSpec::Core::RakeTask.new(:unit) do |t|
+ t.pattern = 'spec/unit/**/*_spec.rb'
+end
+
+RSpec::Core::RakeTask.new(:integration) do |t|
+ t.pattern = 'spec/integration/**/*_spec.rb'
+end
+
+task :default => [:unit, :integration, :journeys, :rubocop, 'coveralls:push']