spec/language_spec.rb in rconf-0.9.25 vs spec/language_spec.rb in rconf-0.10.0

- old
+ new

@@ -11,10 +11,19 @@ require File.join(File.dirname(__FILE__), 'spec_helper') describe RightConf::Language do + before(:all) do + # Disable overrides + RightConf::OverridesLanguage.instance_variable_set(:@overrides, {}) + end + + after(:all) do + RightConf::OverridesLanguage.instance_variable_set(:@overrides, nil) + end + it 'should invalidate missing blocks' do lang = RightConf::Language.parse('toto') lang.validation_errors.size.should == 1 lang.validation_errors.first.should == "Invalid syntax, expecting block after 'toto'" end @@ -29,11 +38,11 @@ lang = RightConf::Language.parse('ruby { version "1"; rubygems "2" }') lang.validation_errors.size.should == 0 lang.configurators.size.should == 1 lang.configurators.first.class.should == RightConf::RubyConfigurator lang.configurators.first.instance_variable_get(:@settings_values).should == - { :version => '1', :rubygems => '2' } + { 'version' => '1', 'rubygems' => '2' } end it 'should parse multiple configurations' do lang = RightConf::Language.parse(<<-EOS ruby do @@ -47,13 +56,13 @@ ) lang.validation_errors.size.should == 0 lang.configurators.size.should == 2 lang.configurators[0].class.should == RightConf::RubyConfigurator lang.configurators[0].instance_variable_get(:@settings_values).should == - { :version => '1', :rubygems => '2' } + { 'version' => '1', 'rubygems' => '2' } lang.configurators[1].class.should == RightConf::BundlerConfigurator lang.configurators[1].instance_variable_get(:@settings_values).should == - { :version => '3' } + { 'version' => '3' } end end