Sha256: 861d2cece6792fc8047463a6bf00fa0f36d2427bbe3048e1071cfac6c3fea920

Contents?: true

Size: 560 Bytes

Versions: 14

Compression:

Stored size: 560 Bytes

Contents

require_relative "spec_helper_initializer"

RSpec.describe "Env" do
  it "uses the same env for Rails and Shakapacker" do
    expect(Shakapacker.env).to eq Rails.env
  end

  it "uses production env without config" do
    with_rails_env("foo") do
      expect(Shakapacker.env).to eq "production"
    end
  end

  it "uses the given env in custom config" do
    with_rails_env("staging") do
      expect(Shakapacker.env).to eq "staging"
    end
  end

  it "uses 'production' as default env" do
    expect(Shakapacker::DEFAULT_ENV).to eq "production"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shakapacker-7.2.3 spec/shakapacker/env_spec.rb
shakapacker-7.3.0.beta.1 spec/shakapacker/env_spec.rb
shakapacker-7.2.2 spec/shakapacker/env_spec.rb
shakapacker-7.2.1 spec/shakapacker/env_spec.rb
shakapacker-7.2.0 spec/shakapacker/env_spec.rb
shakapacker-7.2.0.rc.0 spec/shakapacker/env_spec.rb
shakapacker-7.1.0 spec/shakapacker/env_spec.rb
shakapacker-7.0.3 spec/shakapacker/env_spec.rb
shakapacker-7.0.2 spec/shakapacker/env_spec.rb
shakapacker-7.0.1 spec/shakapacker/env_spec.rb
shakapacker-7.0.0 spec/shakapacker/env_spec.rb
shakapacker-7.0.0.rc.2 spec/shakapacker/env_spec.rb
shakapacker-7.0.0.rc.1 spec/shakapacker/env_spec.rb
shakapacker-7.0.0.rc.0 spec/env_spec.rb