spud_core 0.8.18 → 0.8.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spud::Core do
4
+
5
+ before :each do
6
+ Spud::Core.configure do |config|
7
+ config.site_id = 0
8
+ config.site_name = "Default Site"
9
+ config.short_name = "default"
10
+ config.multisite_mode_enabled = true
11
+ config.multisite_config = [{:hosts => ["test.host"], :site_name =>"Site B", :short_name => 'site_b', :site_id => 1}]
12
+ end
13
+ end
14
+
15
+ describe :site_config_for_id do
16
+ it "should should return the default site config" do
17
+ puts "testing site config for id"
18
+ config = Spud::Core.site_config_for_id(0)
19
+ config.should == {:site_name =>"Default Site", :short_name => 'default', :site_id => 0}
20
+ end
21
+
22
+ it "should return the config for Site B" do
23
+ config = Spud::Core.site_config_for_id(1)
24
+ config.should == {:hosts => ["test.host"], :site_name =>"Site B", :short_name => 'site_b', :site_id => 1}
25
+ end
26
+ end
27
+
28
+ describe :default_site_config do
29
+ it "should return the default site config" do
30
+ puts "testing default site config"
31
+ config = Spud::Core.default_site_config
32
+ config.should == {:site_name =>"Default Site", :short_name => 'default', :site_id => 0}
33
+ end
34
+ end
35
+
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.18
4
+ version: 0.8.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-12 00:00:00.000000000 Z
12
+ date: 2012-07-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -661,6 +661,7 @@ files:
661
661
  - spec/dummy/README.rdoc
662
662
  - spec/dummy/script/rails
663
663
  - spec/helpers/spud/admin/application_helper_spec.rb
664
+ - spec/lib/spud_core/configuration_spec.rb
664
665
  - spec/models/spud_user_spec.rb
665
666
  - spec/spec_helper.rb
666
667
  - spec/support/authlogic_helper.rb
@@ -678,7 +679,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
678
679
  version: '0'
679
680
  segments:
680
681
  - 0
681
- hash: -3295402119631208357
682
+ hash: -4391416595427698733
682
683
  required_rubygems_version: !ruby/object:Gem::Requirement
683
684
  none: false
684
685
  requirements:
@@ -687,7 +688,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
687
688
  version: '0'
688
689
  segments:
689
690
  - 0
690
- hash: -3295402119631208357
691
+ hash: -4391416595427698733
691
692
  requirements: []
692
693
  rubyforge_project:
693
694
  rubygems_version: 1.8.24
@@ -736,6 +737,7 @@ test_files:
736
737
  - spec/dummy/README.rdoc
737
738
  - spec/dummy/script/rails
738
739
  - spec/helpers/spud/admin/application_helper_spec.rb
740
+ - spec/lib/spud_core/configuration_spec.rb
739
741
  - spec/models/spud_user_spec.rb
740
742
  - spec/spec_helper.rb
741
743
  - spec/support/authlogic_helper.rb