Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed spec running script, & it is smart enough to determine by its…
…elf if Method#to_source is supported.
- Loading branch information
Showing
3 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
if [ -z "$TRAVIS" ]; then | ||
echo '' | ||
echo `gem env | grep 'INSTALLATION DIRECTORY' | sed 's/.*\/\(.*\)/\1:/'` | ||
rm -rf ~/.ruby_inline/*ParseTree* | ||
fi | ||
|
||
SUPPORTS_METHOD_TO_SOURCE=`ruby -e ' | ||
begin | ||
[:source_location, :parameters].each{|meth| 1.method(:to_s).send(meth) } | ||
raise RuntimeError if RUBY_PLATFORM =~ /java/i | ||
puts :true | ||
rescue NoMethodError, RuntimeError | ||
puts :false | ||
end | ||
'` | ||
|
||
if [ "$SUPPORTS_METHOD_TO_SOURCE" == "true" ]; then | ||
bundle exec bacon spec/{proc,method}/*/*_spec.rb spec/{proc,method}/*_spec.rb | ||
else | ||
echo "NOTE: This ruby doesn't support Method#to_source (& friends) !!" | ||
bundle exec bacon spec/proc/*/*_spec.rb spec/{proc,no_method}/*_spec.rb | ||
fi | ||
|
||
# __END__ |
This file was deleted.
Oops, something went wrong.