Sha256: 8354ca69d7e44f5774e352f15c7a96d080c20198053bc3f86a6814babfdfb9c6

Contents?: true

Size: 831 Bytes

Versions: 3

Compression:

Stored size: 831 Bytes

Contents

require "spec_helper"

describe "Invoker Power configuration" do
  describe "#create" do
    it "should create a config file given a hash" do
      begin
        File.exists?(Invoker::Power::Config::CONFIG_LOCATION) &&
          File.delete(Invoker::Power::Config::CONFIG_LOCATION)
        config = Invoker::Power::Config.create(
          dns_port: 1200, http_port: 1201, ipfw_rule_number: 010
        )
        File.exists?(Invoker::Power::Config::CONFIG_LOCATION).should == true

        config = Invoker::Power::Config.load_config()
        config.dns_port.should == 1200
        config.http_port.should == 1201
        config.ipfw_rule_number.should == 010
      ensure
        File.exists?(Invoker::Power::Config::CONFIG_LOCATION) &&
          File.delete(Invoker::Power::Config::CONFIG_LOCATION)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
invoker-1.0.2 spec/invoker/power/config_spec.rb
invoker-1.0.1 spec/invoker/power/config_spec.rb
invoker-1.0.0 spec/invoker/power/config_spec.rb