testing dm-polymorphic

0 views
Skip to first unread message

Larry Siden

unread,
Feb 15, 2010, 1:40:09 PM2/15/10
to rubyd...@googlegroups.com, a2...@googlegroups.com
Can anyone help me take a look at this?  I'm trying to test dm-polymorphic.  When I run "spec spec/dm-polymorphic_spec.rb" ("rake spec" won't work out-of-the-box), it craps

/home/lsiden/.rvm/gems/ruby/1.9.1/gems/extlib-0.9.15/lib/extlib/inflection.rb:104:in `constantize': uninitialized constant Comment (NameError)
This is happening in spec/dm-polymorphic_spec.rb on line 27, in the definition of class Post.  Clearly, class Comment has just been defined.

Even if I put: "puts Object::Comment" immediately after the class Comment definition I'll get the same message.  I wonder if it's because classes defined inside of Spec::describe don't get defined in Object?  I don't have enough experience to tell whether this is the usual way of testing classes.  Can someone shed some light?

Larry Siden, 734-926-9614, http://umich.edu/~lsiden

The United States is a nation of laws, badly written and randomly enforced.
--Frank Zappa 1940-1993
Reply all
Reply to author
Forward
0 new messages