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

Clean up command guessing regexes and put spec before cucumber #212

Merged
merged 1 commit into from
Mar 23, 2013
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
12 changes: 12 additions & 0 deletions features/config_command_name.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ Feature: Custom names for individual test suites
| Dreck macht Speck |
| I'm in UR Unitz |

Scenario: RSpec auto detection with spec/features
Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start
"""
And a file named "spec/features/foobar_spec.rb" with:
"""
"""
When I open the coverage report generated with `bundle exec rspec spec`
Then the report should be based upon:
| RSpec |
12 changes: 6 additions & 6 deletions lib/simplecov/command_guesser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ def guess

def from_command_line_options
case original_run_command
when /#{'test/functional/'}/, /#{'test/{.*?functional.*?}/'}/
when /test\/functional\//, /test\/{.*?functional.*?}\//
"Functional Tests"
when /#{'test/integration/'}/
when /test\/integration\//
"Integration Tests"
when /#{'test/'}/
when /test\//
"Unit Tests"
when /cucumber/, /features/
"Cucumber Features"
when /spec/
"RSpec"
when /cucumber/, /features/
"Cucumber Features"
else
nil
end
Expand All @@ -46,4 +46,4 @@ def from_defined_constants
end
end
end
end
end