<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,3 @@
-require 'rake'
 require 'rake/clean'
 
 $:.unshift File.dirname(__FILE__) + '/lib'</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,8 @@ When /^I pass &quot;([^\&quot;]*)&quot; to reek *(.*)$/ do |stdin, args|
   reek_with_pipe(stdin, args)
 end
 
-When /^I run rake reek$/ do
-  rake
+When /^I run rake reek with:$/ do |task_def|
+  rake(task_def)
 end
 
 Then /^stdout equals &quot;([^\&quot;]*)&quot;$/ do |report|</diff>
      <filename>features/step_definitions/reek_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ require 'reek/adapters/application'
 
 class ReekWorld
   def run(cmd)
-    stderr_file = Tempfile.new('cucumber')
+    stderr_file = Tempfile.new('reek-world')
     stderr_file.close
     @last_stdout = `#{cmd} 2&gt; #{stderr_file.path}`
     @last_exit_status = $?.exitstatus
@@ -24,8 +24,20 @@ class ReekWorld
     run(&quot;echo \&quot;#{stdin}\&quot; | ruby -Ilib bin/reek #{args}&quot;)
   end
 
-  def rake
-    run(&quot;rake reek&quot;)
+  def rake(task_def)
+    header = &lt;&lt;EOS
+$:.unshift('lib')
+require 'reek/adapters/rake_task'
+
+EOS
+    rakefile = Tempfile.new('rake_task', '.')
+    rakefile.puts(header + task_def)
+    rakefile.close
+    run(&quot;rake -f #{rakefile.path} reek&quot;)
+    lines = @last_stdout.split(&quot;\n&quot;)
+    if lines.length &gt; 0 and lines[0] =~ /^\(/
+      @last_stdout = lines[1..-1].join(&quot;\n&quot;)
+    end
   end
 end
 </diff>
      <filename>features/support/env.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d06346bee302d955481345cee8cc12655e9c30c4</id>
    </parent>
  </parents>
  <author>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </author>
  <url>http://github.com/kevinrutherford/reek/commit/81a021c9db34a38d464903072975720bd5cb805e</url>
  <id>81a021c9db34a38d464903072975720bd5cb805e</id>
  <committed-date>2009-10-12T06:47:36-07:00</committed-date>
  <authored-date>2009-10-12T06:47:36-07:00</authored-date>
  <message>First feature for RakeTask</message>
  <tree>e5bc03a7c5b3696a9327d42eae33bab517eb1e41</tree>
  <committer>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </committer>
</commit>
