Sha256: f9edfd6cda4a2131b8da7a6c9057e48945483b2d00b212ca14f1a28d725cac6e

Contents?: true

Size: 805 Bytes

Versions: 10

Compression:

Stored size: 805 Bytes

Contents

require 'test_helper'
require 'camping'

module Config end

class Config::Test < TestCase

  def before_all
    write_config()
    Camping.goes :Config
    @options = Camping::Apps.select{|a| a.name == "Config" }.first.options
  end

  def after_all
    trash_config()
  end

  def test_config
    assert @options.has_key? :hostname
    assert @options.has_key? :friends
    assert_equal @options[:friends].first, "_why", "_why isn't here?"
    assert_equal @options[:friends].length, 3, "Where are all our friends?"
    assert_equal @options.has_key?(:database), true, "By Golly the Database settings are missing."
    assert_equal @options[:database].length, 4, "We're missing some database settings."
    assert_equal @options[:database][:adapter], "sqlite3", "sqlite is missing. Not good."
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
camping-3.2.6 test/app_config.rb
camping-3.2.5 test/app_config.rb
camping-3.2.4 test/app_config.rb
camping-3.2.3 test/app_config.rb
camping-3.2.2 test/app_config.rb
camping-3.2.1 test/app_config.rb
camping-3.2.0 test/app_config.rb
camping-3.1.3 test/app_config.rb
camping-3.1.2 test/app_config.rb
camping-3.1.0 test/app_config.rb