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