Sha256: 16a3961cda3929ad06f51d884c27548345f86700a39b1dc493324c644ad2b764

Contents?: true

Size: 647 Bytes

Versions: 18

Compression:

Stored size: 647 Bytes

Contents

require 'spec_helper'

describe Hoth do
  
  before(:each) do
    @old_hoth_env = Hoth.env
    Hoth.instance_variable_set "@env", nil
  end
  
  after(:each) do
    Hoth.env = @old_hoth_env
  end
  
  it "should set the environment explicitly" do
    Hoth.env = :test
    Hoth.env.should == :test
  end
  
  it "should default to :development if no environment is set" do
    Hoth.env.should equal(:development)
  end
  
  it "should return the Rails env if Rails is available" do
    module Rails; end
    Rails.should_receive(:env).and_return(:production)
    Hoth.env.should equal(:production)
    Object.send :remove_const, :Rails
  end
  
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
hoth-0.4.2 spec/unit/hoth_spec.rb
hoth-0.4.1 spec/unit/hoth_spec.rb
hoth-0.4.0 spec/unit/hoth_spec.rb
hoth-0.3.4 spec/unit/hoth_spec.rb
hoth-0.3.3 spec/unit/hoth_spec.rb
hoth-0.3.2.beta4 spec/unit/hoth_spec.rb
hoth-0.3.2.beta3 spec/unit/hoth_spec.rb
hoth-0.3.2.beta2 spec/unit/hoth_spec.rb
hoth-0.3.2.beta1 spec/unit/hoth_spec.rb
hoth-0.3.1 spec/unit/hoth_spec.rb
sk-hoth-0.3.5 spec/unit/hoth_spec.rb
sk-hoth-0.3.4 spec/unit/hoth_spec.rb
sk-hoth-0.3.2 spec/unit/hoth_spec.rb
sk-hoth-0.3.1 spec/unit/hoth_spec.rb
sk-hoth-0.3.0 spec/unit/hoth_spec.rb
hoth-0.3.0 spec/unit/hoth_spec.rb
hoth-0.2.2 spec/unit/hoth_spec.rb
hoth-0.2.1 spec/unit/hoth_spec.rb