public
Description: CAS Server
Homepage:
Clone URL: git://github.com/relevance/castronaut.git
castronaut / spec / castronaut_spec.rb
100644 27 lines (19 sloc) 0.783 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
 
describe Castronaut do
  
  after(:all) do
    Castronaut.config = Castronaut::Configuration.load(File.join(File.dirname(__FILE__), '..', 'config', 'castronaut.example.yml'))
  end
  
  it "exposes the config at Castronaut.config" do
    Castronaut.config.should == Castronaut.instance_variable_get("@cas_config")
  end
  
  it "allows you to reset the config" do
    new_config = stub({}).as_null_object
    original_config = Castronaut.config
    
    Castronaut.config.should_not == new_config
    Castronaut.config = new_config
    Castronaut.config.should == new_config
  end
  
  it "exposes the configuration logger as Castronaut.logger" do
    Castronaut.logger.should == Castronaut.config.logger
  end
 
end