Questions tagged [ruby-test]

Ruby Tests is a Sublime Text 2 plugin for running ruby tests! (Unit, RSpec, Cucumber)

46 questions
3
votes
3 answers

How can I test a model with rspec that has after_create callback

I have this model class User < ActiveRecord::Base after_create :create_in_remote def create_in_remote if self.remote_id.nil? req_url = "api/create/user/#{self.username}" response = Remote.execute_request(req_url) if response …
Alex S
  • 31
  • 3
2
votes
0 answers

CI::Reported not generating xml's for Ruby Test::Units?

I am trying to use CI::reporter to generate report of ruby unit tests. My rakefile: require 'rake' require 'rake/testtask' require 'rake/packagetask' require 'rake' require 'rake/testtask' require 'rake/packagetask' #require…
cheekoo
  • 887
  • 12
  • 22
2
votes
2 answers

sublime text ruby test windows cannot find path

I am running Windows 7 and have installed the sublime text ruby test. I can run rspec spec/ fine from the command line, however when I try it from sublime text i get the following error: I check the PATH variable and its the same in my command…
yoshdog
  • 133
  • 1
  • 7
2
votes
2 answers

Using css selector in Selenium Webdriver with Ruby

I have this code for which I am doing automation testing using ruby.
tech_human
  • 6,592
  • 16
  • 65
  • 107
2
votes
1 answer

Find elements using css selector/xpath of Selenium Webdriver with Ruby

I have recently started using Selenium to test an app having webviews. Well the code for my webview is:
tech_human
  • 6,592
  • 16
  • 65
  • 107
2
votes
1 answer

SublimeText2 RubyTest "Verify Ruby Syntax" triggers UTF-8 error

I am using rvm and ruby 1.9.3 on Mac OS 10.7.5. I'd like to be able to use Sublime Text 2 RubyTest package to verify my Ruby syntax. However, when I attempt to run Tools -> RubyTest -> Verify Ruby Syntax on any ruby file (test.rb below) the…
jladieu
  • 149
  • 1
  • 6
2
votes
2 answers

How to open vim command output in separate tab/window?

I'm using vim-rubytest to execute tests from within MacVim. This prints output in vim's command output window. The problems are that this output is not scrollable or disappears after i switch to editor. Is it possible to send this output to separate…
Sathish
  • 20,660
  • 24
  • 63
  • 71
2
votes
1 answer

RubyTest Sublime Text 2 not working on Windows 7

I've been messing around with this for well over an hour and still can't get RubyTest working within Sublime Text 2. Each time that I attempt to run a test I get a simple message that " 'rspec' is not recognized as an internal or external command,…
Rob
  • 21
  • 1
2
votes
2 answers

RubyTest Not Outputting Test Results on Windows 7

I am on Windows 7 Pro and trying to use RubyTest with Sublime Text 2. I have it installed. I am getting no output in the test results window. If I run a test for example, I see the following in the console: Running bin/rspec…
1
vote
1 answer

Rails: test code in lib directory with RubyTest with Sublime Text 2

I would like test code in the lib directory of Rails. I use RubyTest to work in Sublime Text 2. My library is in lib/my_lib. module MyLib def self.get_zero 0 end end My unit test is in test/unit/lib/my_lib require…
Séverine Darlot
  • 300
  • 2
  • 10
1
vote
1 answer

Sublime Text 3, rbenv, rspec, spring & ruby-tests

I'm using the excellent plugin sublime-text-2-ruby-tests with Sublime Text 3 and have it working. However, the tests are relatively slow (about 5-6 seconds for a single test and 10 seconds for a full spec test). I've noticed that when I go to the…
Al D
  • 657
  • 2
  • 10
  • 27
1
vote
1 answer

"should get show" controller test failing for Nested resource

I have a User model and a Shoppingcart model where # user.rb class User < ActiveRecord::Base has_one :shoppingcart end and # shopppingcart.rb class Shoppingcart < ActiveRecord::Base belongs_to :user end and I have this in…
user2361174
  • 1,872
  • 4
  • 33
  • 51
1
vote
1 answer

Running RubyTest in Sublime Text 3 throws errors

I'm using RubyTest in Sublime Text 3, opening Sublime from my terminal using the subl command, and running into the following error: [MY_HOME_DIRECTORY]/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot…
dessy
  • 136
  • 1
  • 7
1
vote
2 answers

Sublime Text 3, rbenv, TestUnit, RubyTest and Spring correct configuation to get tests working

So I've setup RubyTest / Sublime Text 3 and that works fine. I'm having trouble getting spring to work in RubyTest. There is this cryptic setting: "check_for_spring": false, But when I set to true and run a test it just gives me the default spring…
Brettski
  • 1,061
  • 2
  • 12
  • 25
1
vote
1 answer

RubyTest in Sublime Text Error in Console

I am setting up RubyTest in Sublime Text 2. I installed RubyTest with Package Control and then created a dummy class in a ruby file and a rspec file as a dummy test. I opened the files in Sublime from the terminal. I ran Command-Shift-R,…
hollyglot
  • 13
  • 2
1
2 3 4