Sha256: d2218d979eaa249c5105df2bd0e8a3352e5edcb0ac64aaf4c769afa3cefb99d5

Contents?: true

Size: 597 Bytes

Versions: 2

Compression:

Stored size: 597 Bytes

Contents

require 'spec_helper'

describe Happy do
  describe '#env' do
    it "is a StringInquirer instance describing the RACK environment" do
      Happy.env.should be_kind_of(ActiveSupport::StringInquirer)
    end

    it "provides #development?, #production? etc." do
      ENV.should_receive(:[]).twice.with('RACK_ENV').and_return('development')
      Happy.env.should be_development
      Happy.env.should_not be_production

      ENV.should_receive(:[]).twice.with('RACK_ENV').and_return('production')
      Happy.env.should be_production
      Happy.env.should_not be_development
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
happy-0.1.0.pre13 spec/happy_spec.rb
happy-0.1.0.pre12 spec/happy_spec.rb