Sha256: 7215b1c11dce850f9fd5e2227a5bdb61720f217232fdaa7eadb913e37ad6aa5e

Contents?: true

Size: 473 Bytes

Versions: 4

Compression:

Stored size: 473 Bytes

Contents

require 'rails_helper'

module BerkeleyLibrary
  describe Logging do

    attr_reader :orig_rails_env

    before do
      @orig_rails_env = Rails.env
    end

    after 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

4 entries across 4 versions & 1 rubygems

Version Path
berkeley_library-logging-0.2.7 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.6.2 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.6.1 spec/rails/ucblit/logging/env_spec.rb
berkeley_library-logging-0.2.6 spec/rails/ucblit/logging/env_spec.rb