File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,15 @@ Run a single test
74
74
` $ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something" `
75
75
76
76
Run tests against different Rails versions by setting the RAILS_VERSION variable
77
- and bundling gems.
77
+ and bundling gems. (save this script somewhere executable and run from top of AMS repository)
78
78
79
79
``` bash
80
- for version in 4.0 4.1 4.2 master; do
80
+ #! /usr/bin/env bash
81
+
82
+ rcommand=' puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")'
83
+ versions=$( ruby -ryaml -e " $rcommand " )
84
+
85
+ for version in ${versions[@]} ; do
81
86
export RAILS_VERSION=" $version "
82
87
rm -f Gemfile.lock
83
88
bundle check || bundle --local || bundle
@@ -88,7 +93,12 @@ for version in 4.0 4.1 4.2 master; do
88
93
else
89
94
# red in ANSI
90
95
echo -e " \033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m"
91
- fi
96
+ read -p ' [Enter] any key to continue, [q] to quit...' prompt
97
+ if [ " $prompt " = ' q' ]; then
98
+ unset RAILS_VERSION
99
+ exit 1
100
+ fi
101
+ fi
92
102
unset RAILS_VERSION
93
103
done
94
104
```
You can’t perform that action at this time.
0 commit comments