maltize / sublime-text-2-ruby-tests

Sublime Text 2 plugin for running ruby tests! (Unit, RSpec, Cucumber)
721 stars 119 forks source link

Error using the plugin with Zeus, Yosemite and Sublime Text 2 #252

Open duranmla opened 9 years ago

duranmla commented 9 years ago

I am starting with Rspec and I want to have something just like this plugin, however I can not be able to make it work. please below I provide all the info regarding this issue:

Log shows just:

Switched syntax to: RSpec
Running / U s e r s / l i b a r d o a l e x i s / . r v m / b i n / r v m - a u t o - r u b y   - S   b u n d l e   e x e c     z e u s   r s p e c   s p e c / f e a t u r e s / s e s s i o n s _ s p e c . r b
reloading /Users/libardoalexis/Library/Application Support/Sublime Text 2/Packages/User/RubyTest.last-run

My project is working with:

ruby '2.2.0'
gem 'rails', '4.2.0'

I made a copy of the RubyTest settings on the folder indicated (~/Path/To/Sublime/Packages/User/) and looks like:

{
  "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}'",

  "run_cucumber_command": "zeus cucumber {relative_path} --no-color",
  "run_single_cucumber_command": "zeus cucumber {relative_path}:{line_number} --no-color",

  "run_rspec_command": "zeus rspec {relative_path}",
  "run_single_rspec_command": "zeus rspec {relative_path}:{line_number}",

  "ruby_unit_folder": "test",
  "ruby_cucumber_folder": "features",
  "ruby_rspec_folder": "spec",

  "check_for_rbenv": true,
  "check_for_rvm": true,
  "check_for_bundler": true,
  "check_for_spring": false,

  "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",

  "terminal_encoding": "utf-8"

}

I am using Zeus as my terminal and the ouput when I hit cmd + shift + T on a file like:

require 'rails_helper'

describe 'Session feature:' do
  let(:user) { create(:user) }

  feature 'Login' do

    scenario 'with valid email and password' do
      sign_in user.email, 'password'

      expect(page).to have_content(user.full_name)
    end

    scenario 'with invalid email' do
      sign_in user.email, 'notmypassword'

      expect(current_path).to eq(new_user_session_path)
    end
  end

  feature 'Log out' do
    scenario 'by clicking navigation button' do
      sign_in user.email, 'password'
      click_button 'Log out'

      expect(current_path).to eq(new_user_session_path)
    end
  end
end

is:

bundler: command not found: zeus
Install missing gem executables with `bundle install`
[Finished in 1.2s with exit code 127]

And of course I have run my bundle install before and again and everything looks OK. please sorry about this, it may be something that I did wrong? Or just because I am using capybara too?

As fallback I tried with the default settings and it just say rspec command not found... so I don't know what more can I do.

Thanks in advance. Nice plugin!