mongoid-simplify 0.0.1 → 0.0.2
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.
- data/CHANGELOG.md +6 -0
- data/lib/mongoid-simplify/connection.rb +3 -1
- data/lib/mongoid-simplify/version.rb +1 -1
- data/spec/mongoid_spec.rb +8 -5
- metadata +3 -2
data/CHANGELOG.md
ADDED
data/spec/mongoid_spec.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
MASTER_URI = "mongodb://localhost
|
3
|
+
MASTER_URI = "mongodb://localhost/simplify_master"
|
4
4
|
SLAVE_URI = "mongodb://localhost:27017/simplify_slave"
|
5
5
|
|
6
6
|
describe Mongoid::Simplify::Connection do
|
7
7
|
|
8
8
|
describe "#use" do
|
9
9
|
|
10
|
+
after do
|
11
|
+
Mongoid::Config.sessions.clear
|
12
|
+
end
|
13
|
+
|
10
14
|
describe "when passed an uri as an string" do
|
11
15
|
|
12
16
|
before do
|
@@ -19,17 +23,16 @@ describe Mongoid::Simplify::Connection do
|
|
19
23
|
end
|
20
24
|
|
21
25
|
it "should have an default session configured" do
|
26
|
+
Mongoid::Config.sessions[:default].wont_be_nil
|
22
27
|
Mongoid::Config.sessions.has_key?(:default).must_equal true
|
28
|
+
Mongoid::Config.sessions[:default].must_equal :database => 'simplify_master', :hosts => ['localhost:27017']
|
23
29
|
end
|
24
30
|
|
25
31
|
it "shouldn't have an session named slave configured" do
|
32
|
+
Mongoid::Config.sessions[:slave].must_be_nil
|
26
33
|
Mongoid::Config.sessions.has_key?(:slave).must_equal false
|
27
34
|
end
|
28
35
|
|
29
|
-
after do
|
30
|
-
Mongoid::Config.sessions.clear
|
31
|
-
end
|
32
|
-
|
33
36
|
end
|
34
37
|
|
35
38
|
describe "when passed an list sessions as an array" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-simplify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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-
|
12
|
+
date: 2012-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yard
|
@@ -83,6 +83,7 @@ extensions: []
|
|
83
83
|
extra_rdoc_files: []
|
84
84
|
files:
|
85
85
|
- .gitignore
|
86
|
+
- CHANGELOG.md
|
86
87
|
- Gemfile
|
87
88
|
- LICENSE
|
88
89
|
- README.md
|