Skip to content

Commit

Permalink
Merge pull request #276 from sferik/fix_regexp
Browse files Browse the repository at this point in the history
Improve regexp that matches functional tests
  • Loading branch information
bf4 committed Jul 13, 2014
2 parents 63f75f3 + 724c036 commit a04da31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ end

appraise "multi_json-legacy" do
gem "multi_json", "~> 1.0.0"
end
end
10 changes: 5 additions & 5 deletions lib/simplecov/command_guesser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class << self
# between rails unit/functional/integration tests impossible without this cached
# item.
attr_accessor :original_run_command

def guess
from_env || from_command_line_options || from_defined_constants
end

private

def from_env
Expand All @@ -24,10 +24,10 @@ def from_env
"(#{number}/#{ENV['PARALLEL_TEST_GROUPS']})"
end
end

def from_command_line_options
case original_run_command
when /test\/functional\//, /test\/{.*?functional.*?}\//
when /test\/functional\//, /test\/\{.*functional.*\}\//
"Functional Tests"
when /test\/integration\//
"Integration Tests"
Expand All @@ -41,7 +41,7 @@ def from_command_line_options
nil
end
end

def from_defined_constants
# If the command regexps fail, let's try checking defined constants.
if defined?(RSpec)
Expand Down
2 changes: 1 addition & 1 deletion lib/simplecov/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SimpleCov
VERSION = "0.8.2"
end
end

0 comments on commit a04da31

Please sign in to comment.