Permalink
Browse files

Update build so that it runs specs together, then file-by-file.

We want to keep each spec passing on its own, so this is a good
way to ensure that. There were some missing requires, actually.

The test_all script is derived from a script from Gary Bernhardt:

https://github.com/garybernhardt/raptor/blob/master/script/test_all
  • Loading branch information...
1 parent 8752b9a commit d35b6b5a5213568cd0ffe65164014c96b1ba0e15 @myronmarston myronmarston committed Aug 24, 2012
Showing with 25 additions and 1 deletion.
  1. +6 −1 Rakefile
  2. +17 −0 script/test_all
  3. +1 −0 spec/rspec/core/configuration_options_spec.rb
  4. +1 −0 spec/rspec/core/runner_spec.rb
View
@@ -22,6 +22,11 @@ namespace :spec do
t.ruby_opts = %w[-w]
t.rspec_opts = %w[--tag ui]
end
+
+ desc "Runs all specs together and then file-by-file"
+ task :ci do
+ sh "script/test_all"
+ end
end
if RUBY_VERSION.to_f == 1.8
@@ -73,4 +78,4 @@ task :relish, :version do |t, args|
sh "rm features/Changelog.md"
end
-task :default => [:spec, "spec:ui", :cucumber]
+task :default => ["spec:ci", :cucumber]
View
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+echo "Running all..."
+
+bundle exec rspec spec --format progress --profile
+
+echo
+echo "--------------------------------------------------------------------"
+echo
+
+for file in `find spec -iname '*_spec.rb'`; do
+ echo "Running just $file"
+ bundle exec rspec $file --format progress
+done
+
@@ -1,5 +1,6 @@
require 'spec_helper'
require 'ostruct'
+require 'rspec/core/drb_options'
describe RSpec::Core::ConfigurationOptions, :fakefs do
include ConfigOptionsHelper
@@ -1,4 +1,5 @@
require 'spec_helper'
+require 'rspec/core/drb_command_line'
module RSpec::Core
describe Runner do

0 comments on commit d35b6b5

Please sign in to comment.