Problems during setup

22 views
Skip to first unread message

Martin Streicher

unread,
Jul 29, 2009, 2:38:34 AM7/29/09
to Machinist Users

I am dumping FactoryGirl for Machinist. Trouble is, I cannot get off
the ground. When I try to run spec (or autospec), I get...

/Library/Ruby/Gems/1.8/gems/notahat-machinist-1.0.3/lib/sham.rb:18:in
`method_missing': No sham defined for name (RuntimeError)

I have a spec/blueprints.rb file. I am using ActiveRecord.

Any ideas?
Martin

Martin Streicher

unread,
Jul 29, 2009, 8:54:51 AM7/29/09
to machini...@googlegroups.com

Digging deeper, this seems to be a clash with ZenTest.

The very start of ZenTest does this...

$stdlib = {}
ObjectSpace.each_object(Module) do |m|
$stdlib[m.name] = true if m.respond_to? :name
end

... which obviously fails because no block is specified and Sham
expects a block to Sham.name.

If I change Sham to rename Sham.name or test for the existence of a
block, then I get an error complaining that dm-core from DataMapper is
missing (which comes from machinist/data_mapper, even though I am not
requiring that file.

Do I need to do away with ZenTest? Install dm?

Martin

Martin Streicher

unread,
Jul 29, 2009, 4:38:04 PM7/29/09
to Machinist Users
For the time being, I installed datamapper and deleted the self.name
method found in Machinist.

Pete Yandell

unread,
Aug 12, 2009, 6:44:11 PM8/12/09
to Machinist Users
All very interesting! I run ZenTest with Machinist without any
problems. Which version of ZenTest do you have?

- Pete
Reply all
Reply to author
Forward
0 new messages