Skip to content

Commit

Permalink
Make 'rake' command run tests using Appraisal
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascaton committed Aug 24, 2016
1 parent fd85345 commit c99b48e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -494,7 +494,7 @@ their locale files. Take a look at how to use it running:
rails generate enumerate_it:enum --help
```

## Supported Ruby and Rails (ActiveSupport) versions
## Supported Ruby and Rails versions

Check [travis config file](https://github.com/lucascaton/enumerate_it/blob/master/.travis.yml).

Expand All @@ -516,7 +516,7 @@ codes. I had both situations in my legacy database.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a future
version unintentionally.
* Run the tests agaist all supported versions: `$ appraisal rake`.
* Run the tests agaist all supported versions: `$ rake`.
* Commit, do not mess with Rakefile, version, or history. (if you want to
have your own version, that is fine but bump version in a commit by itself
I can ignore when I pull)
Expand Down
16 changes: 9 additions & 7 deletions Rakefile
@@ -1,12 +1,14 @@
# encoding: utf-8

require 'bundler'
require 'rspec/core/rake_task'
require 'appraisal'

Bundler::GemHelper.install_tasks

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end
RSpec::Core::RakeTask.new(:spec)

task default: :spec
if ENV['APPRAISAL_INITIALIZED'] || ENV['TRAVIS']
task default: :spec
else
task default: :appraisal
end

0 comments on commit c99b48e

Please sign in to comment.