Skip to content

Commit

Permalink
Proper Rakefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
am-kantox committed Apr 11, 2016
1 parent dc33aac commit d7dc5ee
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
# encoding: UTF-8
require 'rubygems'

require 'bundler'
require 'bundler/setup'
require 'bundler/gem_tasks'

require 'cucumber/rake/task'
require 'rspec/core/rake_task'
require 'coveralls/rake/task'

require 'yard'

begin
Bundler.setup(:default, :development, :test)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts 'Run `bundle install` to install missing gems'
exit e.status_code
end

RSpec::Core::RakeTask.new(:examples) do |examples|
examples.rspec_opts = '-Ispec'
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = '-Ispec'
spec.rcov = true
end

require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)

require 'coveralls/rake/task'
Coveralls::RakeTask.new
task :test_with_coveralls => [:spec, :features, 'coveralls:push']

task :default => :test_with_coveralls

require 'yard'
YARD::Rake::YardocTask.new

task test_with_coveralls: [:features, 'coveralls:push']

task default: :test_with_coveralls

0 comments on commit d7dc5ee

Please sign in to comment.