Sha256: 8f52c97f09139f17a7760753a88482b0992a6f76b0c7614614ccc934f58674f6

Contents?: true

Size: 618 Bytes

Versions: 9

Compression:

Stored size: 618 Bytes

Contents

# Copyright (c) 2012-2013 Stark & Wayne, LLC

require File.expand_path("../../spec_helper", __FILE__)

describe Bosh::Bootstrap::Helpers::SettingsSetter do
  include Bosh::Bootstrap::Helpers::SettingsSetter

  attr_reader :settings
  before do
    @settings = {}
  end

  def save_settings!
  end

  it "with_setting 'a'" do
    with_setting "a" do |setting|
      setting['value'] = "abc"
    end
    settings["a"]["value"].should == "abc"
  end

  it "with_setting 'a.b.c'" do
    with_setting "a.b.c" do |setting|
      setting['value'] = "abc"
    end
    settings["a"]["b"]["c"]["value"].should == "abc"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bosh-bootstrap-0.10.2 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.10.1 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.10.0 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.9.0 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.8.2 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.8.1 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.8.0 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.7.1 spec/unit/settings_setter_spec.rb
bosh-bootstrap-0.7.0 spec/unit/settings_setter_spec.rb