Sha256: eb90a83a59d40ccb8896a3b869e4ed7d80aa4d1cb1501036965c8d7cab7196a3

Contents?: true

Size: 1.62 KB

Versions: 7

Compression:

Stored size: 1.62 KB

Contents

require_relative "spec_helper_initializer"

describe "RakeTasks" do
  let(:test_app_path) { File.expand_path("webpacker_test_app", __dir__) }

  it "`rake -T` lists Webpacker tasks" do
    output = Dir.chdir(test_app_path) { `rake -T` }
    expect(output).to match /webpacker .+DEPRECATED/
    expect(output).to match /webpacker:check_binstubs.+DEPRECATED/
    expect(output).to match /webpacker:check_node.+DEPRECATED/
    expect(output).to match /webpacker:check_yarn.+DEPRECATED/
    expect(output).to match /webpacker:clean.+DEPRECATED/
    expect(output).to match /webpacker:clobber.+DEPRECATED/
    expect(output).to match /webpacker:compile.+DEPRECATED/
    expect(output).to match /webpacker:install.+DEPRECATED/
    expect(output).to match /webpacker:verify_install.+DEPRECATED/
  end

  it "`webpacker:check_binstubs` doesn't get 'webpack binstub not found' error" do
    output = Dir.chdir(test_app_path) { `rake webpacker:check_binstubs 2>&1` }
    expect(output).to_not include "webpack binstub not found."
    expect(output).to include "DEPRECATION"
  end

  it "`webpacker:check_node` doesn't get 'webpacker requires Node.js' error" do
    output = Dir.chdir(test_app_path) { `rake webpacker:check_node 2>&1` }
    expect(output).to_not include "Shakapacker requires Node.js"
    expect(output).to include "DEPRECATION"
  end

  it "`webpacker:check_yarn` doesn't get error related to yarn" do
    output = Dir.chdir(test_app_path) { `rake webpacker:check_yarn 2>&1` }
    expect(output).to_not include "Yarn not installed"
    expect(output).to_not include "Shakapacker requires Yarn"
    expect(output).to include "DEPRECATION"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
shakapacker-7.0.3 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.2 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.1 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.0 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.0.rc.2 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.0.rc.1 spec/backward_compatibility_specs/rake_tasks_spec.rb
shakapacker-7.0.0.rc.0 spec/backward_compatibility_specs/rake_tasks_spec_bc.rb