Skip to content

Commit

Permalink
Add rake task for style and tests
Browse files Browse the repository at this point in the history
Instead of remembering all the commands it would be nice to have rake task to run tests and style checkers
closes #164
  • Loading branch information
rahul2240 committed Feb 20, 2018
1 parent 9b75be5 commit 4de2f5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.0
17 changes: 17 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,20 @@ namespace :gem do
system 'gem build trollolo.gemspec'
end
end

require 'rubocop/rake_task'
require 'rspec/core/rake_task'

task default: %i[rubocop spec]

desc 'Run tests'
task :spec do
RSpec::Core::RakeTask.new
end

desc 'Run rubocop'
task :rubocop do
RuboCop::RakeTask.new do |t|
t.options = ['--display-cop-names']
end
end

0 comments on commit 4de2f5f

Please sign in to comment.