Permalink
Browse files

Removed implementation of method human_name

  • Loading branch information...
bearded
bearded committed May 11, 2011
1 parent 7d31285 commit f2ce33738b7f98960a9b0d7f9adedba8dbca976b
Showing with 3 additions and 29 deletions.
  1. +1 −5 lib/mongo_mapper/plugins/rails.rb
  2. +1 −9 test/unit/test_rails.rb
  3. +1 −15 test/unit/test_rails_compatibility.rb
@@ -46,11 +46,7 @@ def has_many(*args, &extension)
def column_names
keys.keys
end
-
- def human_name
- self.name.demodulize.titleize
- end
end
end
end
-end
+end
View
@@ -30,10 +30,6 @@ def foo_bars; true; end
should "have column names" do
@klass.column_names.sort.should == ['_id', 'foo']
end
-
- should "implement human_name" do
- @klass.human_name.should == 'Post'
- end
end
context "Instance methods" do
@@ -117,10 +113,6 @@ def bar
should "have column names" do
@klass.column_names.sort.should == ['_id', 'foo']
end
-
- should "implement human_name" do
- @klass.human_name.should == 'Post'
- end
end
context "Instance methods" do
@@ -188,4 +180,4 @@ def bar
end
end
end
-end
+end
@@ -1,10 +1,6 @@
require 'test_helper'
class TestRailsCompatibility < Test::Unit::TestCase
- class BigStuff
- include MongoMapper::Document
- end
-
class Item
include MongoMapper::EmbeddedDocument
key :for_all, String
@@ -38,15 +34,5 @@ class SecondItem < Item
instance = Item.new
instance.new_record?.should == instance.new?
end
-
- should "implement human_name" do
- Item.human_name.should == 'Item'
- end
- end
-
- context "Document" do
- should "implement human_name" do
- BigStuff.human_name.should == 'Big Stuff'
- end
end
-end
+end

0 comments on commit f2ce337

Please sign in to comment.