Sha256: 9378d7e0b4cc513fbb8b84ae1874203b26d4679c02174ee864566497dda09dd1

Contents?: true

Size: 959 Bytes

Versions: 12

Compression:

Stored size: 959 Bytes

Contents

require "minitest_helper"
require 'alula/config'

describe Alula::Config do
  it "loads default config" do
    config = Alula::Config.new()
    
    config.title.must_equal "The Unnamed Blog"
    config.url.must_equal "http://localhost:3000"
  end
  
  it "overrides given configurations" do
    config = Alula::Config.new(title: "Overriden fun")
    
    config.title.must_equal "Overriden fun"
    config.url.must_equal "http://localhost:3000"
  end
  
  it "loads project configuration" do
    config = Alula::Config.new({}, File.join("test/fixtures/config_001_simple.yml"))
    
    config.title.must_equal "Yet Another Blog"
    config.url.must_equal "http://localhost:3000"
  end

  it "loads project configuration with overrides" do
    config = Alula::Config.new({url: "http://lvh.me:3000"}, File.join("test/fixtures/config_001_simple.yml"))
    
    config.title.must_equal "Yet Another Blog"
    config.url.must_equal "http://lvh.me:3000"
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alula-0.4.10 test/test_config.rb
alula-0.4.9 test/test_config.rb
alula-0.4.8 test/test_config.rb
alula-0.4.7 test/test_config.rb
alula-0.4.6 test/test_config.rb
alula-0.4.5 test/test_config.rb
alula-0.4.4 test/test_config.rb
alula-0.4.3 test/test_config.rb
alula-0.4.2 test/test_config.rb
alula-0.4.1 test/test_config.rb
alula-0.4.0 test/test_config.rb
alula-0.4.0b test/test_config.rb