Sha256: bcae5c6100488824014692223be33bf1796196cdfa7f8667499af3a68b455f9b

Contents?: true

Size: 951 Bytes

Versions: 7

Compression:

Stored size: 951 Bytes

Contents

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

describe "NSISam::Client::Configuration" do
  Configuration = NSISam::Client::Configuration

  it "set and return user" do
    Configuration.user 'why'
    Configuration.user.should == 'why'
  end

  it "set and return password" do
    Configuration.password 'admin123'
    Configuration.password.should == 'admin123'
  end

  it "set and return host" do
    Configuration.host '192.168.0.100'
    Configuration.host.should == '192.168.0.100'
  end

  it "set and return port" do
    Configuration.port '8888'
    Configuration.port.should == '8888'
  end

  it "return a hash of attributes" do
    Configuration.instance_eval do
      user     "why"
      password "chunky"
      host     "localhost"
      port     "8888"
    end
    Configuration.settings.should == {user: "why", password: "chunky",
                                      host: "localhost", port: "8888"}
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nsisam-0.6.2 spec/configuration_spec.rb
nsisam-0.6.1 spec/configuration_spec.rb
nsisam-0.6.0 spec/configuration_spec.rb
nsisam-0.5.4 spec/configuration_spec.rb
nsisam-0.5.3 spec/configuration_spec.rb
nsisam-0.5.2 spec/configuration_spec.rb
nsisam-0.4.0 spec/configuration_spec.rb