michael-ken 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ class KenTest < Test::Unit::TestCase
22
22
  resources.should be_kind_of(Ken::Collection)
23
23
  resources.first.should be_kind_of(Ken::Resource)
24
24
  end
25
-
25
+
26
26
  should "work with a limit specified" do
27
27
  resources = Ken.all(:name => "Apple", :limit => 3)
28
28
  resources.length.should == 3
@@ -48,7 +48,7 @@ class KenTest < Test::Unit::TestCase
48
48
  ],
49
49
  :type => "/film/film"
50
50
  }
51
-
51
+
52
52
  resources = Ken.all(query)
53
53
  resources.length.should == 3
54
54
  resources.first.name.should == "Star Wars Episode IV: A New Hope"
@@ -5,18 +5,19 @@ class AttributeTest < Test::Unit::TestCase
5
5
  setup do
6
6
  data = load_fixture('the_police')
7
7
  @the_police = Ken::Resource.new(data)
8
-
9
- @attribute = @unique_value_attribute = @the_police.attributes[2] # /music/artist/active_start
10
- @unique_object_attribute = @the_police.attributes[12] # /music/artist/origin
11
- @non_unique_value_attribute = @the_police.attributes[9] # /common/topic/alias
12
- @non_unique_object_attribute = @the_police.attributes[5] # /music/artist/album
8
+
9
+ @attribute = @unique_value_attribute = @the_police.views[0].active_start
10
+ @unique_object_attribute = @the_police.views[0].origin
11
+ @unique_object_attribute.unique?
12
+ @non_unique_value_attribute = @the_police.views[1].alias
13
+ @non_unique_object_attribute = @the_police.views[0].album
13
14
  end
14
15
 
15
16
  should "should have values" do
16
17
  @attribute.should have(1).values
17
18
  @non_unique_object_attribute.should have(14).values
18
19
  end
19
-
20
+
20
21
  context "with unique value type" do
21
22
  should "be unique and no object_type" do
22
23
  @unique_value_attribute.unique?.should == true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: michael-ken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - michael
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-08 00:00:00 -07:00
12
+ date: 2009-07-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,6 +22,26 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: json
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: addressable
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
25
45
  description:
26
46
  email: ma[at]zive[dot]at
27
47
  executables: []