spec/base_spec.rb in reviewed-1.0.4 vs spec/base_spec.rb in reviewed-1.1.0
- old
+ new
@@ -59,9 +59,17 @@
describe 'association_name' do
it 'returns the demodulized & pluralized version of itself' do
Reviewed::Article.association_name.should eql("articles")
end
+
+ it 'works for multi word module names' do
+ module Reviewed
+ class FooBar < Base
+ end
+ end
+ Reviewed::FooBar.association_name.should eql("foo_bars")
+ end
end
describe 'attributes' do
before(:each) do
@timestamp = Time.parse("01/01/2013 10:00:00 GMT")