garb 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/garb/profile.rb +4 -0
- data/lib/garb/version.rb +1 -1
- data/test/unit/profile_test.rb +20 -1
- metadata +2 -2
data/lib/garb/profile.rb
CHANGED
data/lib/garb/version.rb
CHANGED
data/test/unit/profile_test.rb
CHANGED
@@ -28,7 +28,26 @@ module Garb
|
|
28
28
|
|
29
29
|
assert_equal profiles, Profile.all
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
|
+
should "return the first profile for a given web property id" do
|
33
|
+
profile1 = stub(:web_property_id => '12345', :id => 'abcdef')
|
34
|
+
profile2 = stub(:web_property_id => '67890', :id => 'ghijkl')
|
35
|
+
entries = [profile1, profile2]
|
36
|
+
|
37
|
+
Garb::Profile.stubs(:all).returns(entries)
|
38
|
+
|
39
|
+
assert_equal profile1, Garb::Profile.first('12345')
|
40
|
+
end
|
41
|
+
|
42
|
+
should "return the first profile for a given table id" do
|
43
|
+
profile1 = stub(:id => '12345', :web_property_id => 'abcdef')
|
44
|
+
profile2 = stub(:id => '67890', :web_property_id => 'ghijkl')
|
45
|
+
entries = [profile1, profile2]
|
46
|
+
|
47
|
+
Garb::Profile.stubs(:all).returns(entries)
|
48
|
+
|
49
|
+
assert_equal profile2, Garb::Profile.first('67890')
|
50
|
+
end
|
32
51
|
end
|
33
52
|
|
34
53
|
context "An instance of the Profile class" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Pitale
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-12-22 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|