Running tests via spork directly from Rubymine

Very fast test execution from inside Rubymine.
Cmd+F8 + 2 seconds == test results 😀

1 Activate DRB in Rubymine
Run > Edit configurations > Defaults > RSpec > Use DRB Server

2 a) Start spork from Rubymine
Tools > Run Spork DRB Server

2 b) (alternatively) start spork from the commandline
Code

  # spec/spec_helper.rb
Spork.prefork do
  if ENV["RUBYMINE_HOME"]
    puts "Rubymine support"
    $:.unshift(File.expand_path("rb/testing/patch/common", ENV["RUBYMINE_HOME"]))
    $:.unshift(File.expand_path("rb/testing/patch/bdd", ENV["RUBYMINE_HOME"]))
  end
end

and run it via:

RUBYMINE_HOME=/Applications/Rubymine\ 3.2.4.app/ spork

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s