<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,30 +6,6 @@
 
 require 'active_support'
 
-module SemanticGap
-  module Spec
-    class MatchMaker
-      def initialize(name, parent, &amp;code)
-        generate_class(name, parent).class_eval(&amp;code)
-        generate_method(name)
-      end
-      
-      def generate_class(name, parent)
-        klass = Class.new(parent ? parent : Object)
-
-        Object.const_set(name.to_s.camelize, klass)
-        @klass = klass
-      end
-      
-      def generate_method(name)
-        Object.send :define_method, name.to_s do |*args|
-          @klass.new(*args)
-        end
-      end
-    end
-  end
-end
-
 # Makes defining RSpec matchers a simpler affair. You still have to provide
 # the typical set of methods: initialize, matches?, etc. The one thing you
 # do not have to do is define a method to instantiate your matcher.
@@ -38,9 +14,18 @@ end
 # along with a method called {name}.
 #
 # If you need or want to inherit from another matcher, you can pass in a hash
-# with the first key being {name} and the super as the value.
+# with the first key being the name of the matcher and the value either being
+# another matcher's name or a class.
 def matcher(name, &amp;code)
-  parent = nil
+  parent = Object
   name, parent = name.to_a.first if name.kind_of? Hash
-  SemanticGap::Spec::MatchMaker.new(name, parent, &amp;code)
+  parent = Object.const_get(parent.to_s.camelize) if parent.kind_of? Symbol
+  
+  klass = Class.new(parent)
+  Object.const_set(name.to_s.camelize, klass)
+  klass.class_eval(&amp;code)
+
+  Object.send :define_method, name.to_s do |*args|
+    klass.new(*args)
+  end
 end</diff>
      <filename>lib/spec_matcher_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,7 +34,7 @@ class InheritsFrom
   end
 end
 
-matcher :test_matcher_with_super =&gt; InheritsFrom do
+matcher :test_matcher_with_super_class =&gt; InheritsFrom do
   def initialize(expecting)  #:nodoc:all
     super(expecting)
   end
@@ -43,7 +43,16 @@ matcher :test_matcher_with_super =&gt; InheritsFrom do
   end
 end
 
-describe 'defmatcher', :shared =&gt; true do
+matcher :test_matcher_with_super_symbol =&gt; :inherits_from do
+  def initialize(expecting)  #:nodoc:all
+    super(expecting)
+  end
+  
+  def matches?(target) #:nodoc:all
+  end
+end
+
+describe 'matcher', :shared =&gt; true do
   describe 'generates a method using the given name that' do
     it &quot;returns an instance of the generated class&quot; do
       @matcher.should be_kind_of(@klass)
@@ -55,14 +64,14 @@ describe 'defmatcher', :shared =&gt; true do
   end
 end
 
-describe 'defmatcher', 'with test_matcher' do
+describe 'matcher', 'with test_matcher' do
   before(:each) do
     @args = [:a, :b]
     @klass = TestMatcher
     @matcher = test_matcher(*@args)
   end
 
-  it_should_behave_like 'defmatcher'
+  it_should_behave_like 'matcher'
 
   it &quot;responds to all of the methods defined in the block&quot; do
     %W(matches? expecting failure_message negative_failure_message).each do |meth|
@@ -71,14 +80,15 @@ describe 'defmatcher', 'with test_matcher' do
   end
 end
 
-describe 'defmatcher', 'with test_matcher_with_super' do
+describe 'matcher with super', :shared =&gt; true do
   before(:each) do
     @args = :arg
-    @klass = TestMatcherWithSuper
-    @matcher = test_matcher_with_super(*@args)
+    @klass = Object.const_get(@matcher_name.to_s.camelize)
+    @method = method(@matcher_name)
+    @matcher = @method.call(*@args)
   end
 
-  it_should_behave_like 'defmatcher'
+  it_should_behave_like 'matcher'
   
   it &quot;responds to all of the methods defined in the block&quot; do
     %W(matches? expecting).each do |meth|
@@ -90,3 +100,19 @@ describe 'defmatcher', 'with test_matcher_with_super' do
     @matcher.should be_kind_of(InheritsFrom)
   end
 end
+
+describe 'matcher', 'with test_matcher_with_super_class' do
+  it_should_behave_like 'matcher with super'
+  
+  before(:all) do
+    @matcher_name = :test_matcher_with_super_class
+  end
+end
+
+describe 'matcher', 'with test_matcher_with_super_symbol' do
+  before(:all) do
+    @matcher_name = :test_matcher_with_super_symbol
+  end
+
+  it_should_behave_like 'matcher with super'
+end</diff>
      <filename>spec/spec_matcher_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>87cfb97471e64cc867ff53347ea6fa3a7034bb47</id>
    </parent>
  </parents>
  <author>
    <name>Nolan Eakins</name>
    <email>sneakin@semanticgap.com</email>
  </author>
  <url>http://github.com/sneakin/spec_matcher_helper/commit/9541b14eaf748458afc1be133c2572f96d77eacd</url>
  <id>9541b14eaf748458afc1be133c2572f96d77eacd</id>
  <committed-date>2008-06-29T20:01:58-07:00</committed-date>
  <authored-date>2008-06-29T20:01:58-07:00</authored-date>
  <message>Dropped back down to the basic method. RSpec was taking over class variable resolution within the generated method.</message>
  <tree>1ecbd9526c782b175052b5e8d2b406a9679aea49</tree>
  <committer>
    <name>Nolan Eakins</name>
    <email>sneakin@semanticgap.com</email>
  </committer>
</commit>
