spec/tasks/load_spec.rb in glyph-0.1.0 vs spec/tasks/load_spec.rb in glyph-0.2.0
- old
+ new
@@ -20,18 +20,28 @@
it "[snippets] should load snippet definitions" do
lambda { Glyph.run! 'load:snippets'}.should_not raise_error
Glyph::SNIPPETS[:test].blank?.should == false
end
+ it "[snippets] should not load snippets.xml in Lite mode" do
+ Glyph.lite_mode = true
+ lambda { Glyph.run! 'load:snippets'}.should_not raise_error
+ Glyph::SNIPPETS[:test].blank?.should == true
+ Glyph.lite_mode = false
+ end
+
it "[macros] should load macro definitions" do
lambda { Glyph.run! 'load:macros'}.should_not raise_error
Glyph::MACROS[:note].blank?.should == false
Glyph::MACROS[:"#"].blank?.should == false
end
it "[config] should load configuration files and apply overrides" do
+ Glyph.config_refresh
+ lambda { Glyph.run! 'load:config'}.should_not raise_error
+ Glyph[:quiet] = true
Glyph::PROJECT_CONFIG.blank?.should == false
Glyph::SYSTEM_CONFIG.blank?.should == false
- cfg('structure.headers').class.to_s.should == "Array"
+ Glyph['structure.headers'].class.to_s.should == "Array"
end
end