Sha256: a841eadeadb8b192cf87c684fb9e09a7534c23736bd5461786458add8f17655a
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require "bundler/gem_tasks" require "pathname" desc "Run all specs" task test: ["run_spec:all_specs"] task default: :test namespace :run_spec do desc "Run shakapacker specs" task :gem do puts "Running Shakapacker gem specs" sh("bundle exec rspec spec/shakapacker/*_spec.rb") end desc "Run specs in the dummy app" task :dummy do puts "Running dummy app specs" spec_dummy_dir = Pathname.new(File.join("spec", "dummy")).realpath Bundler.with_unbundled_env do sh_in_dir(".", "yalc publish") sh_in_dir(spec_dummy_dir, [ "bundle install", "yalc link shakapacker", "yarn install", "bundle exec rspec" ]) end end desc "Run generator specs" task :generator do sh("bundle exec rspec spec/generator_specs/*_spec.rb") end desc "Run all specs" task all_specs: %i[gem dummy generator] do puts "Completed all RSpec tests" end end def sh_in_dir(dir, *shell_commands) Shakapacker::Utils::Misc.sh_in_dir(dir, *shell_commands) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
shakapacker-8.1.0 | Rakefile |
shakapacker-8.0.2 | Rakefile |
shakapacker-8.0.1 | Rakefile |