Sha256: 5bb8a6fc5b1de4f61d9a6954305df91ce0c8010cfe67ba078b27a6a63c8c54f8

Contents?: true

Size: 775 Bytes

Versions: 39

Compression:

Stored size: 775 Bytes

Contents

require "test_helper"

class CommandTest < Minitest::Test
  def test_compile_command_returns_success_status_when_stale
    Webpacker.compiler.stub :stale?, true do
      Webpacker.compiler.stub :run_webpack, true do
        assert_equal true, Webpacker.commands.compile
      end
    end
  end

  def test_compile_command_returns_success_status_when_fresh
    Webpacker.compiler.stub :stale?, false do
      Webpacker.compiler.stub :run_webpack, true do
        assert_equal true, Webpacker.commands.compile
      end
    end
  end

  def test_compile_command_returns_failure_status_when_stale
    Webpacker.compiler.stub :stale?, true do
      Webpacker.compiler.stub :run_webpack, false do
        assert_equal false, Webpacker.commands.compile
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/test/command_test.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/test/command_test.rb
webpacker-4.0.7 test/command_test.rb
webpacker-4.0.6 test/command_test.rb
webpacker-4.0.5 test/command_test.rb
webpacker-4.0.4 test/command_test.rb
webpacker-4.0.3 test/command_test.rb
webpacker-4.0.2 test/command_test.rb
webpacker-3.6.0 test/command_test.rb
webpacker-4.0.1 test/command_test.rb
webpacker-4.0.0 test/command_test.rb
webpacker-4.0.0.rc.8 test/command_test.rb
webpacker-4.0.0.rc.7 test/command_test.rb
webpacker-4.0.0.rc.6 test/command_test.rb
webpacker-4.0.0.rc.5 test/command_test.rb
webpacker-4.0.0.rc.4 test/command_test.rb
webpacker-4.0.0.rc.3 test/command_test.rb
webpacker-4.0.0.rc.2 test/command_test.rb
webpacker-4.0.0.rc.1 test/command_test.rb
webpacker-jets-3.2.101 test/command_test.rb