Sha256: a2ae3faa1ffd7e3b43017781a4fbf8166c205b6a12b1fe2769c3d6d8d9cd19c5
Contents?: true
Size: 941 Bytes
Versions: 2
Compression:
Stored size: 941 Bytes
Contents
require 'test_helper' class ConfigurationTest < Test::Unit::TestCase def setup @valid_file = 'test/data/valid.yml' @empty_file = 'test/data/empty.yml' @hack_file = 'test/data/hack.yml' @invalid_file = 'xxxxxxxxxxxxxxxx.yml' @gems = [{ 'name' => 'ruby-openid', 'version' => '2.1.4', 'native' => 0, }] end should 'receive a yaml file in constructor' do Gemi::Configuration.new(@valid_file) end should 'check for file existance' do assert_raise(Gemi::InvalidConfigurationError) do Gemi::Configuration.new(@invalid_file) end end should 'not be valid if file is empty' do assert_equal false, Gemi::Configuration.new(@empty_file).valid? end should 'load gems' do assert_equal @gems, Gemi::Configuration.new(@valid_file).gems end should 'properly validate hacked file!' do assert_equal false, Gemi::Configuration.new(@hack_file).valid? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ktlacaelel-gemi-0.1.1 | test/configuration_test.rb |
ktlacaelel-gemi-0.1.2 | test/configuration_test.rb |