Closed specious closed 6 years ago
Can you add a test for this?
@davetron5000, I would love to.
I'm relatively new to Ruby and I don't feel like I'm sufficiently familiar with testing in this environment. I looked at the Travis CI logs which clued me in that I should run:
bundle exec rake test features
That generated results.html
which I enjoyed reading. I scrolled through the code in test/
and it looks like maybe tests for the functionality in question can be added to test/tc_help.rb
since the version switch is currently implemented as part of 'help' functionality.
Any advice you could impart on me at this point would be of significant value.
Yeah, there's two bits of tests for this. rake test
will run unit tests and rake features
will run integration tests. Those are specified using Cucumber (files in features/
). Since this affects the user interface of a generated app, you probably want to write an integration test.
If you are new to Ruby and especially if you haven't seen Cucumber, it's pretty gnarly.
You could also test this as a unit test as you describe.
I added a feature test in features/todo.feature
, which passes with the change made in 19eacdf9ee6d81918cc72600e42e23e03568e348 but not without. For the record, the command to run the integration tests is:
bundle exec rake features
And not:
rake features
@davetron5000, could you take another look at this?
So sorry to lose track of this. It looks good. Will merge and release today
As mentioned in #206, --version switch should take priority over default_command.