Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Unable to run single shoulda test #108

Open
avasenin opened this Issue · 10 comments

6 participants

@avasenin

Hi. I have problem with single should test running. The problem appears after commit 963e13b. The plugin determines the test name correctly and build the command, but when it tries to run the command then nothing is executed. If I copy the command from sublime console and run it from terminal directly then all necessary tests are run without any problems. The revision 13b5bbe works like a charm.

My system:
Ubuntu 11.04
Sublime Text 2.0.1
RVM (environment for this project is default for whole system)

I'm running sublime from terminal

@gja
Collaborator

Can you open the sublime console, and type import os; os.environ["PATH"]? is the path looking correct? What is the exact command that is running? Does it work if you run all tests?

@avasenin

PATH is correct. Sublime displays the same PATH for 13b5bbe and master
I see the following command in console:
Running ruby -Itest test/functional/plans_controller_test.rb -n /"reduce number of uploads"/
If I type this command to terminal then tests are executed correctly. I see the following result

Loaded suite test/functional/plans_controller_test
Started
..
Finished in 1.774109 seconds.

2 tests, 4 assertions, 0 failures, 0 errors

In Sublime I see the following result when I try to run single test

Loaded suite test/functional/plans_controller_test
Started

Finished in 0.000134 seconds.

0 tests, 0 assertions, 0 failures, 0 errors
[Finished in 2.2s]

Running all tests works perfectly.

@gs
Collaborator
gs commented

Hi,

As I see you have 2 tests which are being executed after running this command:
Running ruby -Itest test/functional/plans_controller_test.rb -n /"reduce number of uploads"/

could you just paste here the part of your test file so we could look how it looks and what might cause a problem?

Br,
Grzegrz

@cannikin

+1 This happens for me as well.

When running that test command ruby -Itest test/functional/plans_controller_test.rb -n /"reduce number of uploads"/ I get 0 tests run as well. Apparently the syntax is different for shoulda tests?

@gja
Collaborator

I wonder if we need to escape the "s in the string?

@filiptepper

@avasenin, which version of Ruby are you using? Which test framework, Test::Unit or minitest?

@avasenin

I uses ruby 1.8.7 and Test:Unit. I checked the last origin/master and it still doesn't work. I checked this issue on my another project (ruby 1.9.3 + Test:Unit + Shoulda + run tests via bundler) and it works fine. I'm still using the revision 13b5bbe. It works like a charm.

@jcalvert

I'm also getting this while running 1.8.7 and shoulda + Test:Unit + bundler. I have the latest version of the plugin.

@gs
Collaborator
gs commented

is this still valid?

@filiptepper

@gs Can't tell, I no longer use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.