Sha256: c4db42b98aea1ed773f9a432181617b30bcbac0be8dd3b9f9a9020007ecc4726

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

require "spec_helper"

class Test
  include Albacore::Task

  attr_accessor :foo,
                :bar,
                :baz
end

describe "yaml configuration" do
  subject(:yml) { Test.new() }

  before :each do  
    yml.configure("spec/yaml/test.yml")
  end
  
  it "should set the property" do
    yml.foo.should == "foo"
  end
      
  it "should set the hashtable" do
    yml.bar["foo"].should == "foo"
    yml.bar["bar"].should == "bar"
  end
  
  it "should set a symbol value" do
    yml.baz.should == :baz
  end  
end

describe "yaml configuration by folder" do
  Albacore.configure.yaml_config_folder = "spec/yaml"

  subject(:yml) { Test.new() }

  before :each do
    yml.load_config_by_task_name("test")
  end
  
  it "should set the property" do
    yml.foo.should == "foo"
  end
      
  it "should set the hashtable" do
    yml.bar["foo"].should == "foo"
    yml.bar["bar"].should == "bar"
  end
  
  it "should set a symbol value" do
    yml.baz.should == :baz
  end  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
albacore-1.0.0 spec/yamlconfig_spec.rb
albacore-1.0.0.rc.3 spec/yamlconfig_spec.rb