Skip to content

Directly run `mix test` on single files/tests from within Sublime Text!

License

Notifications You must be signed in to change notification settings

tarzan/sublime-text-elixir-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sublime Text Elixir Tests

DISCLAIMER

I shamelessly copied the excellent Sublime Plugin (RubyTest)[https://github.com/maltize/sublime-text-2-ruby-tests] and just modified it so it would run mix instead of rspec and detect Elixir files instead of Ruby ones. So all credit goes to these guys:

CONTRIBUTORS

Thanks go out to:

for bugfixing and tweaking this thing :)

Overview

Running:

  • Elixir tests (all tests with mix: from file / single test)

Installation

Go to your Sublime Text Packages directory

  • OS X: ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
  • Windows: %APPDATA%/Sublime Text 2/Packages/
  • Linux: ~/.config/sublime-text-2/Packages/

and clone the repository using the command below:

git clone https://github.com/tarzan/sublime-text-elixir-tests.git ElixirTest

Settings

'Sublime Text' -> 'Preferences' -> 'Package Settings' -> 'ElixirTest'

Make a copy of ElixirTest.sublime-settings file to ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/ and make your changes.

Usage

  • Run single elixir test: Ctrl-Command-Shift-R
  • Run all elixir tests from current file: Ctrl-Command-Shift-T
  • Run last elixir test(s): Ctrl-Command-Shift-E
  • Show test panel: Command-Shift-X (when test panel visible hit esc to hide it)
  • Switching between code and test (create a file if not found):
    • Single View: Command-.
    • Split View: Command-Ctrl-. Keys: 'Command' (OSX) 'Ctrl' (Linux / Windows)

elixir_tests screenshot

Settings:

{
  "run_mix_command": "mix {relative_path}",
  "run_single_mix_command": "mix {relative_path}:{line_number}",

  "mix_test_folder": "test",

  "check_for_mix": false,

  "save_on_run": false,
  "ignored_directories": [".git", "vendor", "tmp"],

  "hide_panel": false,

  "before_callback": "",
  "after_callback": "",

  "theme": "Packages/ElixirTest/TestConsole-belafonte-night.tmTheme",
  "syntax": "Packages/ElixirTest/TestConsole.tmLanguage",

  "terminal_encoding": "utf-8"
}

About

Directly run `mix test` on single files/tests from within Sublime Text!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages