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 openSUSE#164
  • Loading branch information
rahul2240 committed Feb 20, 2018
1 parent 9b75be5 commit 031f872
Show file tree
Hide file tree
Showing 2 changed files with 16 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
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ 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'
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
end

0 comments on commit 031f872

Please sign in to comment.