Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (28 sloc) 0.928 kb
471adcb @binarylogic Complete rewrite, see changelog / readme
authored
1 require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
2
3 describe "Settingslogic" do
4 it "should be a hash" do
5 Settings.send(:instance).should be_is_a(Hash)
6 end
7
8 it "should access settings" do
e927113 @binarylogic more tests
authored
9 Settings.setting2.should == 5
471adcb @binarylogic Complete rewrite, see changelog / readme
authored
10 end
11
12 it "should access nested settings" do
13 Settings.setting1.setting1_child.should == "saweet"
14 end
15
e927113 @binarylogic more tests
authored
16 it "should access deep nested settings" do
17 Settings.setting1.deep.another.should == "my value"
18 end
19
20 it "should access extra deep nested settings" do
21 Settings.setting1.deep.child.value.should == 2
22 end
23
471adcb @binarylogic Complete rewrite, see changelog / readme
authored
24 it "should enable erb" do
25 Settings.setting3.should == 25
26 end
27
28 it "should namespace settings" do
29 Settings2.setting1_child.should == "saweet"
30 end
28dc69b @MitinPavel The issue with 'nested keys' was fixed.
MitinPavel authored
31
32 it "should distinguish nested keys" do
ad83a57 @MitinPavel Settings data was changed to clarify specs.
MitinPavel authored
33 Settings.language.haskell.paradigm.should == 'functional'
34 Settings.language.smalltalk.paradigm.should == 'object oriented'
28dc69b @MitinPavel The issue with 'nested keys' was fixed.
MitinPavel authored
35 end
36 end
Something went wrong with that request. Please try again.