Skip to content

Commit

Permalink
Adding a rake spec:ci task which omits deliberately failing specs
Browse files Browse the repository at this point in the history
  • Loading branch information
markiz committed Apr 16, 2011
1 parent 151d5ff commit 7d56ebb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/failing_rspec_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'Following 9 examples should all be failing:' do
describe 'Following 9 examples should all be failing:', :deliberately_failing => true do
describe EventMachine, " when running failing examples" do
include EventedSpec::EMSpec

Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Expand Up @@ -26,6 +26,7 @@ def done

RSpec.configure do |c|
c.filter_run_excluding :nojruby => true if RUBY_PLATFORM =~ /java/
c.filter_run_excluding :deliberately_failing => true if ENV["EXCLUDE_DELIBERATELY_FAILING_SPECS"]
end

amqp_config = File.dirname(__FILE__) + '/amqp.yml'
Expand Down
9 changes: 7 additions & 2 deletions tasks/spec.rake
@@ -1,11 +1,16 @@
desc 'Alias to spec:spec'
task :spec => 'spec:spec'
task :spec => 'spec:all'

namespace :spec do
require 'rspec/core/rake_task'

desc "Run all specs"
RSpec::Core::RakeTask.new(:spec){|task|}
RSpec::Core::RakeTask.new(:all){|task|}

desc "Run all non-failing specs (for CI)"
RSpec::Core::RakeTask.new(:ci) do |task|
ENV["EXCLUDE_DELIBERATELY_FAILING_SPECS"] = "1"
end

desc "Run specs with RCov"
RSpec::Core::RakeTask.new(:rcov) do |t|
Expand Down

0 comments on commit 7d56ebb

Please sign in to comment.