Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use TaggedModel to be more clear

  • Loading branch information...
commit f13f67433ff0856e4117227033f8f73a76a6eb80 1 parent ff49e98
@jackdempsey authored
View
4 spec/sequel-setup.rb
@@ -6,7 +6,7 @@
#DB["select * from sqlite_master"].print
-class ExampleModel < Sequel::Model
+class TaggedModel < Sequel::Model
set_schema do
primary_key :id
varchar :name
@@ -15,4 +15,4 @@ class ExampleModel < Sequel::Model
is :taggable
end
-ExampleModel.create_table!
+TaggedModel.create_table!
View
12 spec/sequel_taggable/sequel_taggable_spec.rb
@@ -2,22 +2,22 @@
describe Sequel::Plugins::Taggable do
before do
- @example = ExampleModel.new
+ @tagged_model = TaggedModel.new
end
it "should add a .has_tags method to models which include DataMapper::Resource" do
- ExampleModel.should respond_to(:has_tags)
+ TaggedModel.should respond_to(:has_tags)
# AnotherTaggedModel.should respond_to(:has_tags)
# DefaultTaggedModel.should respond_to(:has_tags)
# UntaggedModel.should respond_to(:has_tags)
end
- #
- # it "should add a .has_tags_on method to models which include DataMapper::Resource" do
- # TaggedModel.should respond_to(:has_tags_on)
+
+ it "should add a .has_tags_on method to models which include DataMapper::Resource" do
+ TaggedModel.should respond_to(:has_tags_on)
# AnotherTaggedModel.should respond_to(:has_tags_on)
# DefaultTaggedModel.should respond_to(:has_tags_on)
# UntaggedModel.should respond_to(:has_tags_on)
- # end
+ end
#
# describe ".has_tags_on" do
# it "should accept an array of context names" do
View
4 spec/sequel_taggable/tagging_spec.rb
@@ -34,8 +34,8 @@
@tagging.should respond_to(:taggable)
@tagging.taggable.should_not be
@tagging.taggable_id = 11111
- @tagging.taggable_type = "ExampleModel"
- ExampleModel.should_receive(:get!).with(11111)
+ @tagging.taggable_type = "TaggedModel"
+ TaggedModel.should_receive(:get!).with(11111)
@tagging.taggable
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.