Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use TaggedModel to be more clear

  • Loading branch information...
commit f13f67433ff0856e4117227033f8f73a76a6eb80 1 parent ff49e98
jack dempsey authored December 02, 2008
4  spec/sequel-setup.rb
@@ -6,7 +6,7 @@
6 6
 #DB["select * from sqlite_master"].print
7 7
 
8 8
 
9  
-class ExampleModel < Sequel::Model
  9
+class TaggedModel < Sequel::Model
10 10
   set_schema do
11 11
     primary_key :id
12 12
     varchar :name
@@ -15,4 +15,4 @@ class ExampleModel < Sequel::Model
15 15
   is :taggable
16 16
 end
17 17
 
18  
-ExampleModel.create_table!
  18
+TaggedModel.create_table!
12  spec/sequel_taggable/sequel_taggable_spec.rb
@@ -2,22 +2,22 @@
2 2
 
3 3
 describe Sequel::Plugins::Taggable do
4 4
   before do
5  
-    @example = ExampleModel.new
  5
+    @tagged_model = TaggedModel.new
6 6
   end
7 7
   
8 8
   it "should add a .has_tags method to models which include DataMapper::Resource" do
9  
-    ExampleModel.should respond_to(:has_tags)
  9
+    TaggedModel.should respond_to(:has_tags)
10 10
     # AnotherTaggedModel.should respond_to(:has_tags)
11 11
     # DefaultTaggedModel.should respond_to(:has_tags)
12 12
     # UntaggedModel.should respond_to(:has_tags)
13 13
   end
14  
-  # 
15  
-  # it "should add a .has_tags_on method to models which include DataMapper::Resource" do
16  
-  #   TaggedModel.should respond_to(:has_tags_on)
  14
+
  15
+  it "should add a .has_tags_on method to models which include DataMapper::Resource" do
  16
+    TaggedModel.should respond_to(:has_tags_on)
17 17
   #   AnotherTaggedModel.should respond_to(:has_tags_on)
18 18
   #   DefaultTaggedModel.should respond_to(:has_tags_on)
19 19
   #   UntaggedModel.should respond_to(:has_tags_on)
20  
-  # end
  20
+  end
21 21
   # 
22 22
   # describe ".has_tags_on" do
23 23
   #   it "should accept an array of context names" do
4  spec/sequel_taggable/tagging_spec.rb
@@ -34,8 +34,8 @@
34 34
     @tagging.should respond_to(:taggable)
35 35
     @tagging.taggable.should_not be
36 36
     @tagging.taggable_id = 11111
37  
-    @tagging.taggable_type = "ExampleModel"
38  
-    ExampleModel.should_receive(:get!).with(11111)
  37
+    @tagging.taggable_type = "TaggedModel"
  38
+    TaggedModel.should_receive(:get!).with(11111)
39 39
     @tagging.taggable
40 40
   end
41 41
 end

0 notes on commit f13f674

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