Sha256: cacec32bb39578db3c07188704815435257919b4e96da4529ff949e843100845

Contents?: true

Size: 430 Bytes

Versions: 43

Compression:

Stored size: 430 Bytes

Contents

describe "Prime.env" do

  before do 
    ENV['PRIME_ENV'] = 'staging'
  end

  it 'to_s should return string' do
    Prime.env.to_s.is_a?(String).should.be.true
  end

  it 'should be comparable with string' do
    (Prime.env == 'staging').should.be.true
    (Prime.env == 'test').should.be.false
  end

  it 'should respond to question mark' do
    Prime.env.staging?.should.be.true
    Prime.env.test?.should.be.false
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
motion-prime-1.0.7 spec/unit/prime/env.rb
motion-prime-1.0.6 spec/unit/prime/env.rb
motion-prime-1.0.5 spec/unit/prime/env.rb
motion-prime-1.0.4 spec/unit/prime/env.rb
motion-prime-1.0.3 spec/unit/prime/env.rb
motion-prime-1.0.2 spec/unit/prime/env.rb
motion-prime-1.0.1 spec/unit/prime/env.rb
motion-prime-1.0.0 spec/unit/prime/env.rb
motion-prime-0.9.9.2 spec/unit/prime/env.rb
motion-prime-0.9.9.1 spec/unit/prime/env.rb
motion-prime-0.9.9 spec/unit/prime/env.rb
motion-prime-0.9.8 spec/unit/prime/env.rb
motion-prime-0.9.7 spec/unit/prime/env.rb
motion-prime-0.9.6 spec/unit/prime/env.rb
motion-prime-0.9.5 spec/unit/prime/env.rb
motion-prime-0.9.4 spec/unit/prime/env.rb
motion-prime-0.9.3 spec/unit/prime/env.rb
motion-prime-0.9.2 spec/unit/prime/env.rb
motion-prime-0.9.1 spec/unit/prime/env.rb
motion-prime-0.9.0 spec/unit/prime/env.rb