Skip to content

Instantly share code, notes, and snippets.

@jonathanroehm
Last active November 13, 2017 14:37
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 jonathanroehm/88a3932a15045351ccaed41ead538ca8 to your computer and use it in GitHub Desktop.
Save jonathanroehm/88a3932a15045351ccaed41ead538ca8 to your computer and use it in GitHub Desktop.
Sublime Text 3: RubyTest package user settings for RSpec, Test::Unit and Cucumber
// OSX Location: /Users/[username]/Library/Application Support/Sublime Text 3/Packages/User/RubyTest.sublime-settings
// To access RubyTest's user settings in Sublime Text 3:
// Sublime Text > Preferences > Package Settings > RubyTest > Settings - User
// Hot Keys when editing a (spec) file:
// Cmd + Shift + R -- Test this line
// Cmd + Shift + T -- Test this document
// Cmd + Shift + E -- Re-run previous test (can be executed from any file, does not need to be the spec file in question)
// Note rbenv / rvm / bundler settings -- update to fit your environment
// Copy & Paste relevant settings (RSpec, Test::Unit or Cucumber) into RubyTest.sublime-settings:
// RSpec configuration (with Spring)
{
"erb_verify_command": "erb -xT - {file_name} | ruby -c",
"ruby_verify_command": "ruby -c {file_name}",
"run_rspec_command": "spring rspec -I fast_specs {relative_path}",
"run_single_rspec_command": "spring rspec -I fast_specs {relative_path}:{line_number}",
"ruby_rspec_folder": "spec",
"check_for_rbenv": false,
"check_for_rvm": true,
"check_for_bundler": true,
"ruby_use_scratch" : false,
"save_on_run": false,
"ignored_directories": [".git", "vendor", "tmp"],
"hide_panel": false,
"before_callback": "",
"after_callback": "",
"theme": "Packages/RubyTest/TestConsole.hidden-tmTheme",
"syntax": "Packages/RubyTest/TestConsole.tmLanguage"
}
// Test::Unit configuration
{
"erb_verify_command": "erb -xT - {file_name} | ruby -c",
"ruby_verify_command": "ruby -c {file_name}",
"run_ruby_unit_command": "ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "ruby -Itest {relative_path} -n '{test_name}'",
"ruby_unit_folder": "test",
"check_for_rbenv": false,
"check_for_rvm": true,
"check_for_bundler": true,
"ruby_use_scratch" : false,
"save_on_run": false,
"ignored_directories": [".git", "vendor", "tmp"],
"hide_panel": false,
"before_callback": "",
"after_callback": "",
"theme": "Packages/RubyTest/TestConsole.hidden-tmTheme",
"syntax": "Packages/RubyTest/TestConsole.tmLanguage"
}
// Cucumber Configuration
{
"erb_verify_command": "erb -xT - {file_name} | ruby -c",
"ruby_verify_command": "ruby -c {file_name}",
"run_cucumber_command": "cucumber {relative_path}",
"run_single_cucumber_command": "cucumber {relative_path} -l{line_number}",
"ruby_cucumber_folder": "features",
"check_for_rbenv": false,
"check_for_rvm": true,
"check_for_bundler": true,
"ruby_use_scratch" : false,
"save_on_run": false,
"ignored_directories": [".git", "vendor", "tmp"],
"hide_panel": false,
"before_callback": "",
"after_callback": "",
"theme": "Packages/RubyTest/TestConsole.hidden-tmTheme",
"syntax": "Packages/RubyTest/TestConsole.tmLanguage"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment