more changes and testing stuff

This commit is contained in:
John Bintz 2011-06-06 09:49:37 -04:00
parent 761de5a80a
commit 76c5d0e850
5 changed files with 14 additions and 4 deletions

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
rvm:
- 1.8.7
- 1.9.2
- ree
script: "bundle exec spec"

View File

@ -2,7 +2,7 @@ source "http://rubygems.org"
# Specify your gem's dependencies in guard-jasmine-headless-webkit.gemspec
gemspec
gem 'guard'
gem 'guard', :git => 'https://github.com/guard/guard.git'
gem 'rspec'
gem 'mocha'
gem 'rake', '0.8.7'

View File

@ -17,6 +17,7 @@ home folder's `.jasmine-headless-webkit` file.
* `:all_on_start => false` to not run everything when starting, just like `guard-rspec`.
* `:run_before => "<command to run>` to run a command before running specs. If the command fails, the test run stops.
* `:jammit => true` to run `jammit -f 2>/dev/null` before the tests for the current file change are run.
* `:valid_extensions => %w{` to run `jammit -f 2>/dev/null` before the tests for the current file change are run.
## What's the deal with `newest_js_file`?

View File

@ -7,6 +7,10 @@ task :push_everywhere do
system %{git push guard master}
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
namespace :spec do
desc "Run on three Rubies"
task :platforms do
@ -15,8 +19,9 @@ namespace :spec do
fail = false
%w{1.8.7 1.9.2 ree}.each do |version|
puts "Switching to #{version}"
system %{rvm #{version}}
system %{bundle exec rspec spec}
Bundler.with_clean_env do
system %{bash -c 'source ~/.rvm/scripts/rvm && rvm #{version} && bundle exec rake spec'}
end
if $?.exitstatus != 0
fail = true
break

View File

@ -73,7 +73,6 @@ module Guard
class Dsl
def newest_js_file(path)
p binding
Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first
end
end