Sha256: f736c88462b9e91a8a22eb71d7e24910a47474ea025a60caffc502468ab3860c
Contents?: true
Size: 1.95 KB
Versions: 3
Compression:
Stored size: 1.95 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe "Pancake::Stack" do before(:each) do class ::StackSpecStack < Pancake::Stack end end after(:each) do clear_constants(:StackSpecStack) end describe "roots" do it "should provide access to setting the roots" do StackSpecStack.roots.should be_empty StackSpecStack.roots << File.expand_path(File.dirname(__FILE__)) StackSpecStack.roots.should include(File.expand_path(File.dirname(__FILE__))) end it "should provide access to adding a root" do StackSpecStack.roots.should be_empty StackSpecStack.roots << Pancake.get_root(__FILE__) StackSpecStack.roots.should include(File.expand_path(File.dirname(__FILE__))) end it "should allow me to get multiple roots in the order they're added" do StackSpecStack.roots.should be_empty StackSpecStack.roots << Pancake.get_root(__FILE__) StackSpecStack.roots << "/tmp" StackSpecStack.roots.should == [Pancake.get_root(__FILE__), "/tmp"] end it "should iterate over the roots in the direction they're added" do StackSpecStack.roots.should be_empty StackSpecStack.roots << Pancake.get_root(__FILE__) StackSpecStack.roots << "/foo" StackSpecStack.roots.map{|f| f}.should == [Pancake.get_root(__FILE__), "/foo"] end it "should allow me to set a root with a file" do StackSpecStack.add_root(__FILE__) StackSpecStack.roots.should include(Pancake.get_root(__FILE__)) end end # roots # describe "initialize stack" do it "should mark a stack as initialized once it has called the initialize_stack method" do StackSpecStack::BootLoader StackSpecStack.roots << ::Pancake.get_root(__FILE__) StackSpecStack.initialize_stack StackSpecStack.should be_initialized end it "should not be initialized when it has not called initialize_stack" do StackSpecStack.should_not be_initialized end # end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pancake-0.1.12 | spec/pancake/stack/stack_spec.rb |
pancake-0.1.10 | spec/pancake/stack/stack_spec.rb |
pancake-0.1.8 | spec/pancake/stack/stack_spec.rb |