Sha256: 72072693850677c2b5d67cc66673abe9a06261a9388c2fd0c8e7cab25c35bc7c

Contents?: true

Size: 583 Bytes

Versions: 8

Compression:

Stored size: 583 Bytes

Contents

require "spec_helper"

module RockConfig
  describe EnvironmentDetector do
    it "detects rails' environment" do
      detector = EnvironmentDetector.new("RAILS_ENV" => "production")
      detector.detect.should eq("production")
    end

    it "detects rack's environment" do
      detector = EnvironmentDetector.new("RACK_ENV" => "production")
      detector.detect.should eq("production")
    end

    it "fallbacks to development environment if no other specified" do
      detector = EnvironmentDetector.new({})
      detector.detect.should eq("development")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rock_config-0.0.7 spec/environment_detector_spec.rb
rock_config-0.0.6 spec/environment_detector_spec.rb
rock_config-0.0.5 spec/environment_detector_spec.rb
rock_config-0.0.4 spec/environment_detector_spec.rb
rock_config-0.0.3 spec/environment_detector_spec.rb
rock_config-0.0.2 spec/environment_detector_spec.rb
rock_config-0.0.1 spec/environment_detector_spec.rb
rock_config-0.0.0 spec/environment_detector_spec.rb