Sha256: 29c5119eab7b305743c2e88c615267030f0bbae6c6f2b8ddf3db7d53e8644a60

Contents?: true

Size: 975 Bytes

Versions: 9

Compression:

Stored size: 975 Bytes

Contents

require 'spec_helper'

describe Squall::Config do
  before(:each) do
    @config = Squall::Config.new
  end

  describe "#new" do
    it "sets up the @config hash" do
      @config.config.should == {}
    end
  end

  describe "#[]" do
    it "behaves like an array" do
      @config.config[:something] = 1
      @config[:something].should == 1
    end
  end

  describe "#base_uri" do
    it "sets the base_uri" do
      @config.config[:base_uri].should be_nil
      @config.base_uri 'url'
      @config.config[:base_uri].should == 'url'     
    end
  end

  describe "#username" do
    it "sets the username" do
      @config.config[:username].should be_nil     
      @config.username 'user'
      @config.config[:username].should == 'user'      
    end
  end

  describe "#password" do
    it "sets the password" do
      @config.config[:password].should be_nil           
      @config.password 'pass'
      @config.config[:password].should == 'pass'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
squall-1.4.0 spec/squall/support/config_spec.rb
squall-1.3.1 spec/squall/support/config_spec.rb
squall-1.3.0 spec/squall/support/config_spec.rb
squall-1.2.1beta1 spec/squall/support/config_spec.rb
squall-1.2.0beta1 spec/squall/support/config_spec.rb
squall-1.1.0 spec/squall/support/config_spec.rb
squall-1.0.2 spec/squall/config_spec.rb
squall-1.0.1 spec/squall/config_spec.rb
squall-1.0.0 spec/squall/config_spec.rb