Sha256: 3ec89b3357e5a1129993351c2d58ee255f48c091cd4de6cbed550171c77dc619

Contents?: true

Size: 715 Bytes

Versions: 11

Compression:

Stored size: 715 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Rapnd::Config" do  
  it 'has a default value' do
    Rapnd.config.redis_host.should == 'localhost'
  end
  
  it 'overrides a default value with an assigner' do
    Rapnd.config.redis_host = 'testhost'
    
    Rapnd.config.redis_host.should == 'testhost'
  end
  
  it 'overrides a default value with a block' do
    Rapnd.config do |config|
      config.redis_host = 'testhost'
    end
    
    Rapnd.config.redis_host.should == 'testhost'
  end
  
  it 'checks a value has been assigned' do
    Rapnd.config.redis_host?.should be_true
    
    Rapnd.config.redis_host = nil
    
    Rapnd.config.redis_host?.should be_false
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rapnd-mikec54088-0.5.5 spec/config_spec.rb
rapnd-mikec54088-0.5.4 spec/config_spec.rb
rapnd-mikec54088-0.5.3 spec/config_spec.rb
rapnd-mikec54088-0.5.2 spec/config_spec.rb
rapnd-mikec54088-0.5.1 spec/config_spec.rb
rapnd-mikec54088-0.5.0 spec/config_spec.rb
rapnd-0.5.0 spec/config_spec.rb
rapnd-0.4.1 spec/config_spec.rb
rapnd-0.4.0 spec/config_spec.rb
rapnd-0.3.1 spec/config_spec.rb
rapnd-0.3.0 spec/config_spec.rb