Sha256: d2543dda68d1af51702a7d19ffbcdea344b0f3d9756835b051dd88fa0633d896

Contents?: true

Size: 487 Bytes

Versions: 6

Compression:

Stored size: 487 Bytes

Contents

require 'rails_helper'

module BerkeleyLibrary
  describe Logging do

    attr_reader :orig_rails_env

    before(:each) do
      @orig_rails_env = Rails.env
    end

    after(:each) do
      Rails.env = orig_rails_env
    end

    describe :env= do
      it 'sets Rails.env' do
        expect(defined?(Rails)).to be_truthy # just to be sure
        Logging.env = 'elvis'
        expect(Rails.env).to eq('elvis')
        expect(Rails.env.elvis?).to eq(true)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
berkeley_library-logging-0.2.5 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.4 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.3 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.2 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.1 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.0 spec/rails/ucblit/logging/env_spec.rb