Skip to content

Commit

Permalink
If guessing the test framework from terminal command fails, try const…
Browse files Browse the repository at this point in the history
…ants
  • Loading branch information
colszowka committed Nov 1, 2011
1 parent 6aeec4b commit 37afca5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/simplecov/command_guesser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ def self.guess(command)
when /spec/
"RSpec"
else
return command
# If the command regexps fail, let's try checking defined constants.
if defined?(RSpec)
return "RSpec"
elsif defined?(Test::Unit)
return "Unit Tests"
else
return command
end
end
end
end

0 comments on commit 37afca5

Please sign in to comment.