Rakefile in genevalidatorapp-1.5.4 vs Rakefile in genevalidatorapp-2.0.0

- old
+ new

@@ -1,21 +1,24 @@ -require 'bundler/gem_tasks' -require 'rspec/core' -require 'rspec/core/rake_task' +require 'rake/testtask' +GEMSPEC = Gem::Specification::load('genevalidatorapp.gemspec') task default: [:build] desc 'Builds and installs' task install: [:build] do - require_relative 'lib/genevalidatorapp/version' - sh "gem install ./genevalidatorapp-#{GeneValidatorApp::VERSION}.gem" + sh "gem install #{Rake.original_dir}/genevalidatorapp-#{GEMSPEC.version}.gem" end desc 'Runs tests and builds gem (default)' task build: [:test] do - sh 'gem build genevalidatorapp.gemspec' + sh "gem build #{Rake.original_dir}/genevalidatorapp.gemspec" end -task test: :spec -RSpec::Core::RakeTask.new(:spec) do |spec| - spec.pattern = FileList['spec/**/*_spec.rb'] +desc 'Runs tests' +task :test do + Rake::TestTask.new do |t| + t.libs.push 'lib' + t.test_files = FileList['test/test_*.rb'] + t.verbose = false + t.warning = false + end end