On Windows I'm install RubyTest Plugging for SublimeText3.
I'm runing Vagrant with CentOS6.5 where is my Rails4 project with configured rspec.
How I can start RubyTest Plugging in SublimeText3 which run rspec tests through vagrant on virtual CentOS but not on Windows?
I'm set:
{
"ignored_directories": [".git", "vendor", "tmp"],
"run_rspec_command": "vagrant ssh --command \"'cd /vagrant/sites/sample_app && rspec spec'\""
}
It works!
But how to set for run:
1) only active test file?
2) only active line in test file?
PS It works only in SublimeText2
I've had success with a custom RubyTest command. Crafting that command depends on your individual setup, but my configuration looks like the following:
These commands makes a few assumptions.
You have an environment variable called
$DIR_WITH_VAGRANTFILEthat has the path to the directory which contains your VagrantfileThat directory is mounted at /vagrant in your VM
There are several rails apps under that directory, e.g. /vagrant/rails_app_1, /vagrant/rails_app_2
The command works by extracting the full folder path from the relative_file variable, and remotely executing
bundle exec rspecon the filename.If you hvae a simpler setup with the rails app being directly within /vagrant, then you should be able to get away with something like the following:
Note: If you have multiple rails apps in different setups and different locations, you'll have to change this setup for each configuration.