Skip to content

Commit

Permalink
specs for initializer, fixed extension loader spec
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Jun 25, 2009
1 parent 13cbb11 commit 17b053a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/lib/radiant/extension_loader_spec.rb
Expand Up @@ -126,6 +126,7 @@
end

it "should have metal paths" do
@instance.stub!(:load_extension_roots).and_return(@extension_paths)
@instance.should respond_to(:metal_paths)
@instance.metal_paths.should be_instance_of(Array)
@instance.metal_paths.all? {|f| File.directory?(f) }.should be_true
Expand All @@ -141,6 +142,7 @@
end

it "should return the metal paths in inverse order to the loaded" do
@instance.should_receive(:load_extension_roots).and_return(@extension_paths)
extensions = [BasicExtension, OverridingExtension]
@instance.extensions = extensions
@instance.metal_paths.should == [
Expand Down
4 changes: 4 additions & 0 deletions spec/lib/radiant/initializer_spec.rb
Expand Up @@ -94,4 +94,8 @@
it "should have access to the AdminUI" do
@initializer.admin.should == Radiant::AdminUI.instance
end

it "should load metal from RADIANT_ROOT and exensions" do
Rails::Rack::Metal.metal_paths.should == ["#{RADIANT_ROOT}/app/metal", "#{RADIANT_ROOT}/test/fixtures/extensions/02_overriding/app/metal", "#{RADIANT_ROOT}/test/fixtures/extensions/01_basic/app/metal"]
end
end

0 comments on commit 17b053a

Please sign in to comment.