Sha256: bd0feb93dac25e03803419e11c595e58b95411eb424dac49366a911f802e8dff

Contents?: true

Size: 850 Bytes

Versions: 5

Compression:

Stored size: 850 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
        )
        expect(File.exists?(Invoker::Power::Config::CONFIG_LOCATION)).to be_true

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
invoker-1.2.0.pre1 spec/invoker/power/config_spec.rb
invoker-1.2.0.pre spec/invoker/power/config_spec.rb
invoker-1.1.0 spec/invoker/power/config_spec.rb
invoker-1.0.4 spec/invoker/power/config_spec.rb
invoker-1.0.3 spec/invoker/power/config_spec.rb