Permalink
Browse files

Run only relevant tests for each Gemfile

Change-Id: I3e7a9f574240b2bf5ca0c7fd9ec31ddf493ad2d6
  • Loading branch information...
1 parent 94f75ed commit fe22c7865a5af18ffec779d018e0f2e683f8572a @dsabeti dsabeti committed Dec 13, 2012
View
@@ -5,6 +5,14 @@ require "rspec/core/rake_task"
desc "Run all specs"
RSpec::Core::RakeTask.new("spec") do |t|
t.rspec_opts = %w[--color --format documentation]
+ case ENV["BUNDLE_GEMFILE"]
+ when "Gemfile.router"
+ t.pattern = ['spec/router/*_spec.rb', 'spec/common/*_spec.rb']
+ when "Gemfile.dea"
+ t.pattern = ['spec/dea/*_spec.rb', 'spec/common/*_spec.rb']
+ when "Gemfile.staging"
+ t.pattern = ['spec/staging/*_spec.rb', 'spec/common/*_spec/rb']
+ end
end
desc "Run all specs and provide output for ci"
@@ -1,4 +1,5 @@
require 'yajl'
+require 'membrane'
require 'schemata/common/error'
module Schemata
@@ -1,3 +1,5 @@
+require 'vcap/common'
+
module Schemata
module Router
module RegisterRequest
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
f =~ /lib\/schemata\/(router|common|helpers)/
end
gem.executables = `git ls-files`.split($\).grep(%r{^bin/}).map{ |f| File.basename(f) }
- gem.test_files = `git ls-files`.split($\).grep(%r{^(test|spec|features)/})
+ gem.test_files = `git ls-files`.split($\).grep(%r{^spec/(router/|common/|support/|spec_helper.rb)})
gem.require_paths = ["lib"]
gem.add_dependency("membrane")

0 comments on commit fe22c78

Please sign in to comment.