Skip to content

Commit

Permalink
Merge pull request #181 from semanticart/master
Browse files Browse the repository at this point in the history
Add support for command guessing in Rails 4
  • Loading branch information
colszowka committed Dec 10, 2012
2 parents 5b9c32b + a7024ef commit 87e81cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased ([changes](https://github.com/colszowka/simplecov/compare/v0.7.0...master))
-------------------

* [FEATURE] Adds support for Rails 4 command guessing.

v0.7.1, 2012-10-12 ([changes](https://github.com/colszowka/simplecov/compare/v0.7.0...v0.7.1))
-------------------

Expand Down Expand Up @@ -170,4 +172,4 @@ v0.5.0, 2011-09-09 ([changes](https://github.com/colszowka/simplecov/compare/v0.
* The display of source files has been improved a lot. Weird scrolling trouble, out-of-scope line hit counts
and such should be a thing of the past. Also, it is prettier now.
* Source files are now syntax highlighted
* File paths no longer have that annoying './' in front of them
* File paths no longer have that annoying './' in front of them
2 changes: 1 addition & 1 deletion lib/simplecov/command_guesser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def guess

def from_command_line_options
case original_run_command
when /#{'test/functional/'}/
when /#{'test/functional/'}/, /#{'test/{.*?functional.*?}/'}/
"Functional Tests"
when /#{'test/integration/'}/
"Integration Tests"
Expand Down
6 changes: 3 additions & 3 deletions test/test_command_guesser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def self.should_guess_command_name(expectation, *argv)
end
end

should_guess_command_name "Unit Tests", '/some/path/test/units/foo_bar_test.rb', 'test/units/foo.rb', 'test/foo.rb'
should_guess_command_name "Functional Tests", '/some/path/test/functional/foo_bar_controller_test.rb'
should_guess_command_name "Integration Tests", '/some/path/test/integration/foo_bar_controller_test.rb'
should_guess_command_name "Unit Tests", '/some/path/test/units/foo_bar_test.rb', 'test/units/foo.rb', 'test/foo.rb', 'test/{models,helpers,unit}/**/*_test.rb'
should_guess_command_name "Functional Tests", '/some/path/test/functional/foo_bar_controller_test.rb', 'test/{controllers,mailers,functional}/**/*_test.rb'
should_guess_command_name "Integration Tests", '/some/path/test/integration/foo_bar_controller_test.rb', 'test/integration/**/*_test.rb'
should_guess_command_name "Cucumber Features", 'features', 'cucumber', 'cucumber features'
should_guess_command_name "RSpec", '/some/path/spec/foo.rb'
should_guess_command_name "Unit Tests", 'some_arbitrary_command with arguments' # Because Test::Unit const is defined!
Expand Down

0 comments on commit 87e81cc

Please sign in to comment.