Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve regexp that matches functional tests #276

Merged
merged 2 commits into from
Jul 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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