<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,48 +7,43 @@ require 'throat_punch'
 require File.dirname(__FILE__) + '/../lib/etsy'
 
 class Test::Unit::TestCase
-  
+
   def self.read_fixture(method_name)
     file = File.dirname(__FILE__) + &quot;/fixtures/#{method_name}.json&quot;
     JSON.parse(File.read(file))['results']
   end
-  
+
   def read_fixture(method_name)
     self.class.read_fixture(method_name)
   end
-  
+
   def mock_request_cycle(options)
     response = Etsy::Response.new(stub())
-    
+
     data = read_fixture(options[:data])
     data = data.first if data.size == 1
-    
+
     response.stubs(:result).with().returns(data)
-    
+
     Etsy::Request.stubs(:get).with(options[:for]).returns(response)
-    
+
     response
   end
-  
+
   def self.when_populating(klass, options, &amp;block)
     data = options[:from].is_a?(String) ? read_fixture(options[:from])[0] : options[:from].call
-    
-    class_eval do
-      define_method &quot;setup_for_population&quot; do
-        @object = klass.new(data)
-      end
+
+    context &quot;with data populated for #{klass}&quot; do
+      setup { @object = klass.new(data) }
+      merge_block(&amp;block)
     end
-    
-    block.call
+
   end
 
   def self.value_for(method_name, options)
-    class_eval do
-      should &quot;have a value for :#{method_name}&quot; do
-        setup_for_population
-        @object.send(method_name).should == options[:is]
-      end
+    should &quot;have a value for :#{method_name}&quot; do
+      @object.send(method_name).should == options[:is]
     end
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f618ef5244806bb155ea60c4da926cf476917488</id>
    </parent>
  </parents>
  <author>
    <name>Patrick Reagan</name>
    <email>patrick.reagan@viget.com</email>
  </author>
  <url>http://github.com/reagent/etsy/commit/7ae4289c90b8823cf95ef24d1ab808a0ee07ef76</url>
  <id>7ae4289c90b8823cf95ef24d1ab808a0ee07ef76</id>
  <committed-date>2009-05-22T19:19:42-07:00</committed-date>
  <authored-date>2009-05-22T19:19:42-07:00</authored-date>
  <message>Convert test macro over to Shoulda w/ merge_block()</message>
  <tree>03f01e62ea9c1861caeeed444641a1253ba56643</tree>
  <committer>
    <name>Patrick Reagan</name>
    <email>patrick.reagan@viget.com</email>
  </committer>
</commit>
