Rakefile in git-switcher-0.0.2 vs Rakefile in git-switcher-1.0.0
- old
+ new
@@ -1,32 +1,33 @@
-require "bundler/gem_tasks"
+# rubocop:disable Style/SymbolArray
+# rubocop:disable Style/HashSyntax
-task :default => [:test]
-task :test => [:spec, :features]
+require 'bundler/gem_tasks'
-task :gemspec do
- @gemspec ||= eval(File.read(Dir["*.gemspec"].first))
+task :validate_gemspec do
+ Bundler.load_gemspec('git-switcher.gemspec').validate
end
-desc "Validate the gemspec"
-task :validate => :gemspec do
- @gemspec.validate
+task :version => :validate_gemspec do
+ puts Git::Switcher.version
end
-require 'rspec'
-require 'rspec/core/rake_task'
+require 'rubocop/rake_task'
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.rspec_opts = "--format d --color"
-end
+RuboCop::RakeTask.new(:rubocop)
-task :rspec => [:spec]
+require 'rake/testtask'
-require 'cucumber'
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new(:features) do |t|
- t.cucumber_opts = "features --format pretty --tags ~@wip"
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'test'
+ t.libs << 'lib'
+ t.test_files = FileList['test/**/*_test.rb']
end
-task :cucumber => [:features]
+task :default => [:version, :rubocop, :test]
+task :documentation
+
+Rake::Task['build'].enhance([:default, :documentation])
+
+# rubocop:enable Style/HashSyntax
+# rubocop:enable Style/SymbolArray