{"id":189,"date":"2010-03-23T21:47:22","date_gmt":"2010-03-24T03:47:22","guid":{"rendered":"http:\/\/www.pervasivecode.com\/blog\/?p=189"},"modified":"2010-03-23T21:47:22","modified_gmt":"2010-03-24T03:47:22","slug":"how-to-make-machinist-and-autotest-coexis","status":"publish","type":"post","link":"http:\/\/www.pervasivecode.com\/blog\/2010\/03\/23\/how-to-make-machinist-and-autotest-coexis\/","title":{"rendered":"How to make Machinist and Autotest coexist"},"content":{"rendered":"<p>If you&#8217;ve tried to use Machinist and autotest (part of ZenTest) you have probably seen this exception that prevented you from using it: <\/p>\n<pre>`method_missing': No sham defined for name<\/pre>\n<p>It&#8217;s discussed in <a href=\"http:\/\/groups.google.com\/group\/machinist-users\/browse_thread\/thread\/9af4aa2243ae0368\/4e9bba83113ace20\">the machinist Google Group<\/a> as well.<\/p>\n<p>It&#8217;s because of a wacky hack that&#8217;s part of Machinist that overrides Module.name so you can do <code>Sham.name<\/code>, but ZenTest expects Module.name to do what it does normally.<\/p>\n<p>I have a fix for this.<br \/>\n<!--more--><\/p>\n<p>I sent notahat a pull request via GitHub, so hopefully it&#8217;ll be merged by notahat into the official machinist gem, but until that happens you can try mine. I published the gem as JamieFlournoy-machinist to rubygems.org.<\/p>\n<p>Try &#8216;gem install JamieFlournoy-machinist -v 1.0.6&#8217; and see if it works for you. It does for me with ZenTest 4.2.1, autotest-rails 4.1.0, and a Rails 2.3.5 project.<\/p>\n<p><a href=\"http:\/\/github.com\/JamieFlournoy\/machinist\">(my machinist fork on github)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve tried to use Machinist and autotest (part of ZenTest) you have probably seen this exception that prevented you from using it: `method_missing&#8217;: No sham defined for name It&#8217;s discussed in the machinist Google Group as well. It&#8217;s because of a wacky hack that&#8217;s part of Machinist that overrides Module.name so you can do &hellip; <a href=\"http:\/\/www.pervasivecode.com\/blog\/2010\/03\/23\/how-to-make-machinist-and-autotest-coexis\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to make Machinist and Autotest coexist&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,26,20,30,9],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-agile-development","category-ruby","category-ruby-on-rails","category-testing","category-tools"],"_links":{"self":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/189"}],"collection":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":4,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":193,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions\/193"}],"wp:attachment":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}