humble 0.0.1369313534 → 0.0.1374296843
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/lib/humble/mapping_configuration.rb +2 -1
- data/lib/humble/result_set.rb +10 -0
- data/spec/integration/example_spec.rb +12 -2
- data/spec/integration/fixtures/movie_mapping.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a07fd88ec8a4eb23bc2664ecb4e040b9810b7955
|
4
|
+
data.tar.gz: 2bc6434c1fe15d55d2319d429a952c6b65f23b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d0cf9e612c4f542c55aa47f837de75629ae6da985a4350f6d4412e7acffaf448639eff0490d98a86f58f6e69955e0705b028670bbf1da770ad2568400fc40fc
|
7
|
+
data.tar.gz: 607bb277179bed53fa228c8b47e46fd51508e3f4e26fa362107ea4a4b3bd8bde0338de85ff431eeba67aba8ab4b7b7c0ffbdaf4e9a2f318979f520e23b479c35
|
data/.ruby-gemset
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
humble
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.0.0-
|
1
|
+
ruby-2.0.0-p247
|
data/lib/humble/result_set.rb
CHANGED
@@ -23,7 +23,7 @@ describe "orm" do
|
|
23
23
|
|
24
24
|
context "when fetching all items" do
|
25
25
|
before :each do
|
26
|
-
connection[:movies].insert(:name => 'monsters inc')
|
26
|
+
@id = connection[:movies].insert(:name => 'monsters inc')
|
27
27
|
end
|
28
28
|
|
29
29
|
let(:results) { session.find_all Movie }
|
@@ -39,12 +39,18 @@ describe "orm" do
|
|
39
39
|
it "should return instances of the target type" do
|
40
40
|
results.first.should be_instance_of(Movie)
|
41
41
|
end
|
42
|
+
|
43
|
+
it "should include the saved movie" do
|
44
|
+
results.should include(Movie.new(:id => @id, :name => 'monsters inc'))
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
context "when inserting a new record" do
|
49
|
+
let(:movie) { Movie.new(:name => 'oop') }
|
50
|
+
|
45
51
|
before :each do
|
46
52
|
session.begin_transaction do |session|
|
47
|
-
session.save(
|
53
|
+
session.save(movie)
|
48
54
|
end
|
49
55
|
end
|
50
56
|
|
@@ -62,6 +68,10 @@ describe "orm" do
|
|
62
68
|
it "should insert the name" do
|
63
69
|
results.first[:name].should == 'oop'
|
64
70
|
end
|
71
|
+
|
72
|
+
it "should update the new item with the new id" do
|
73
|
+
movie.id.should_not == -1
|
74
|
+
end
|
65
75
|
end
|
66
76
|
|
67
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1374296843
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo khan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|