Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve the way we run builds.

- No need for `find_path_to_rspec_exe`; I've discovered that `--standalone`
  and `--binstubs` together produce bins that don't load bundler.
- Add `-x` to `set -e` as that will cause the script to print each command
  as it runs.  No need for `print_and_run`.
- Add cucumber to test_all script, and use just that for the build.
  • Loading branch information...
commit 63ae97f81107500324ca63021f9b250ae1417820 1 parent 2dcfb20
@myronmarston myronmarston authored
Showing with 12 additions and 21 deletions.
  1. +2 −2 .travis.yml
  2. +0 −7 script/find_path_to_rspec_exe
  3. +10 −12 script/test_all
View
4 .travis.yml
@@ -1,5 +1,5 @@
-bundler_args: "--binstubs --without documentation"
-script: "script/test_all && bin/rake --backtrace 2>&1"
+bundler_args: "--binstubs --standalone --without documentation"
+script: "script/test_all"
rvm:
- 1.8.7
- 1.9.2
View
7 script/find_path_to_rspec_exe
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.expand_path('../../bundle/bundler/setup', __FILE__)
-rspec_core_path = $LOAD_PATH.grep(/rspec-core/).first
-
-puts File.expand_path('../exe/rspec', rspec_core_path)
-
View
22 script/test_all
@@ -1,28 +1,26 @@
#!/bin/bash
-function print_and_run {
- echo $1
- ($1)
-}
-
-set -e
+set -e -x
echo "Bundling Standalone so we can run the specs w/o bundler loaded"
-bundle install --standalone
-path_to_rspec_exe=`script/find_path_to_rspec_exe`
-
-command_prefix="ruby -r./bundle/bundler/setup.rb -S $path_to_rspec_exe"
+bundle install --standalone --binstubs
echo "Running all..."
-print_and_run "$command_prefix spec --format progress --profile"
+bin/rspec spec --format progress --profile
echo
echo "--------------------------------------------------------------------"
echo
for file in `find spec -iname '*_spec.rb'`; do
- print_and_run "$command_prefix $file --format progress"
+ bin/rspec $file --format progress
done
+# TODO: it would be nice to figure out how to run the cukes w/o the overhead of
+# bundler, but just running `bin/cucumber` can fail due to the fact that it
+# shells out (via aruba) and executes `rspec`--which can pick up the wrong
+# rspec version if we're not running with bundler.
+bundle exec cucumber
+
Please sign in to comment.
Something went wrong with that request. Please try again.