File: env_test.rb

package info (click to toggle)
ruby-webpacker 5.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,472 kB
  • sloc: ruby: 1,626; javascript: 1,480; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require "test_helper"

class EnvTest < Webpacker::Test
  def test_current
    assert_equal Webpacker.env, Rails.env
  end

  def test_custom_without_config
    with_rails_env("foo") do
      assert_equal Webpacker.env, "production"
    end
  end

  def test_custom_with_config
    with_rails_env("staging") do
      assert_equal Webpacker.env, "staging"
    end
  end

  def test_default
    assert_equal Webpacker::Env::DEFAULT, "production"
  end
end