Skip to content

Instantly share code, notes, and snippets.

@jasonm
Created October 13, 2009 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonm/209304 to your computer and use it in GitHub Desktop.
Save jasonm/209304 to your computer and use it in GitHub Desktop.
diff --git a/ruby_focused_unit_test.vim b/ruby_focused_unit_test.vim
index 6455c35..c3c35c0 100644
--- a/ruby_focused_unit_test.vim
+++ b/ruby_focused_unit_test.vim
@@ -69,7 +69,7 @@ class RubyFocusedUnitTest
buffer.bdelete!
end
- buffer = VIM::Buffer.create DEFAULT_OUTPUT_BUFFER, :location => :below, :text => "--- Run Focused Unit Test ---\n\n"
+ buffer = VIM::Buffer.create DEFAULT_OUTPUT_BUFFER, :location => :below, :text => "--- Run Focused Unit Test ---\nCommand:\n#{test_command}\n\n"
VIM.command("setlocal buftype=nowrite")
VIM.command "redraw"
@@ -125,7 +125,7 @@ class RubyFocusedUnitTest
end
end
- write_output_to_buffer("ruby #{current_file} -n #{method_name}") if method_name
+ write_output_to_buffer("ruby -Itest #{current_file} -n #{method_name}") if method_name
end
def run_test
@@ -154,7 +154,7 @@ class RubyFocusedUnitTest
write_output_to_buffer("spec #{current_file} -l #{context_line_number}")
else
method_name = "\"/#{Regexp.escape(method_name)}/\""
- write_output_to_buffer("ruby #{current_file} -n #{method_name}")
+ write_output_to_buffer("ruby -Itest #{current_file} -n #{method_name}")
end
end
end
@@ -163,7 +163,7 @@ class RubyFocusedUnitTest
if spec_file?
write_output_to_buffer("spec #{current_file}")
else
- write_output_to_buffer("ruby #{current_file}")
+ write_output_to_buffer("ruby -Itest #{current_file}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment