Skip to content

Commit

Permalink
Merge pull request #53 from jamezilla/master
Browse files Browse the repository at this point in the history
Bug fix for running spring tests under rails >= 4.0 without spring testunit
  • Loading branch information
rymai committed May 29, 2014
2 parents e9b992a + fd2e1ba commit e37d13f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/guard/test/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,19 @@ def executables
parts << case true
when drb? then 'testdrb'
when zeus? then 'zeus test'
when spring? then 'spring testunit'
when spring? then spring_command
else 'ruby'; end
end

def spring_command
if Gem.loaded_specs["rails"] && Gem.loaded_specs["rails"].version < Gem::Version.create('4.0')
'spring testunit'
else
# rails > 4.0 supports passing a path to rake test
'spring rake test'
end
end

def includes_and_requires(paths)
parts = []
parts << Array(options[:include]).map { |path| "-I\"#{path}\"" } unless zeus? || spring?
Expand Down

0 comments on commit e37d13f

Please sign in to comment.