Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

more has_tags_on work

  • Loading branch information...
commit 1d399ea49b55bf91093285061d7aae3d6cb6943b 1 parent f4c6d14
jack dempsey authored December 02, 2008
38  spec/sequel_taggable/sequel_taggable_spec.rb
@@ -26,25 +26,23 @@ class HasTagsOnTestModel < Sequel::Model
26 26
       end
27 27
       lambda{HasTagsOnTestModel.has_tags_on(:should, 'not', :raise)}.should_not raise_error(ArgumentError)
28 28
     end
29  
-  # 
30  
-  #   it "should create taggable functionality for each of the context names passed" do
31  
-  #     class TestModel
32  
-  #       include DataMapper::Resource
33  
-  #       property :id, Integer, :serial => true
34  
-  # 
35  
-  #       has_tags_on(:pets, 'skills', :tags)
36  
-  #     end
37  
-  #     TestModel.should be_taggable
38  
-  #     a = TestModel.new
39  
-  #     a.should be_taggable
40  
-  #     a.should respond_to(:pet_list)
41  
-  #     a.should respond_to(:skill_list)
42  
-  #     a.should respond_to(:tag_list)
43  
-  #     a.should respond_to(:pet_list=)
44  
-  #     a.should respond_to(:skill_list=)
45  
-  #     a.should respond_to(:tag_list=)
46  
-  #   end
47  
-  # end
  29
+
  30
+    it "should create taggable functionality for each of the context names passed" do
  31
+      class TestModel < Sequel::Model
  32
+        is :taggable
  33
+        has_tags_on(:pets, 'skills', :tags)
  34
+      end
  35
+      TestModel.should be_taggable
  36
+      a = TestModel.new
  37
+      a.should be_taggable
  38
+      a.should respond_to(:pet_list)
  39
+      a.should respond_to(:skill_list)
  40
+      a.should respond_to(:tag_list)
  41
+      a.should respond_to(:pet_list=)
  42
+      a.should respond_to(:skill_list=)
  43
+      a.should respond_to(:tag_list=)
  44
+    end
  45
+  end
48 46
   # 
49 47
   # describe ".has_tags" do
50 48
   #   it "should create a taggable with 'tags' context regardless of passed arguments" do
@@ -66,5 +64,5 @@ class HasTagsOnTestModel < Sequel::Model
66 64
   #     a.should_not respond_to(:skill_list=)
67 65
   #     a.should_not respond_to(:skills)
68 66
   #   end
69  
-  end
  67
+  #end
70 68
 end

0 notes on commit 1d399ea

Please sign in to comment.
Something went wrong with that request. Please try again.