History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RUBY-1106
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Roman Chernyatchik
Reporter: Alex Ooi
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Ruby

Feedback is inadequete when running RSPEC tests

Created: 29 Oct 07 02:37   Updated: 21 Aug 08 18:58
Component/s: Tests
Fix Version/s: 2.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 11,932
Severity: High


 Description  « Hide
Running RSPEC tests within IntelliJ doesn't give the user any feedback after the completion of the test. The only feedback received is along the lines of:

Process finished with exit code X

where X is either 1 or 0 depending on failure or success of the test.

A previous ruby plugin version provided the same feedback as running RSPEC on the command line (dots for success, E or F for failures, and a summary after the tests completed of all failing tests)

Apparently there is a RSPEC plugin for intelliJ, but I cannot find it anywhere.

Currently, to get around this problem we are running all our RSPEC tests through the command line (outside of IntelliJ).



 All   Comments   Work Log   Change History      Sort Order:
Roman Chernyatchik - 31 Oct 07 22:42
I cannot reproduce it.

1. It occurs in rails or ruby project?
2. Are you sure that IDEA creates RSpec run configuration?
3. Please provide command line (first line in IDEA console)
4. What test framework is selected in [Settings]->[Project Settings] > [your module]> [Test Framework]

P.S: I suppose Idea runs you specs with Test::Unit tests runner.


Alex Ooi - 01 Nov 07 01:32
1. It does happen in a ruby on rails project
2. I'm not sure what you are referring to. We simply create a new ruby script and 'require' the appropriate spec_helper file. This works fine when we run it through the command line with 'ruby [spec file name]'
3. Command line is as follows:

C:/ruby/ruby/bin/ruby.exe -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) C:/ruby/ruby/bin/spec C:/ruby/workspace/GiftGuide-trunk/spec/controllers/gift_lists_controller_spec.rb -c

4. We have selected Test::Unit as the framework. However, we have both Test Unit and RSPEC tests in our project, and we do not want to have to change the IDEA settings each time we want to run rspec or TestUnit tests. We would ideally like IDEA to be smart enough to know whether it should run the test as rspec or testunit.


Roman Chernyatchik - 01 Nov 07 14:41
Ok, i've understood what the problem is. Plugin has some problems with understanding of ouput format of windows colouring gem(win32console) . I will fix it soon.

As quick fix I suggest you to run spec without "-c" argument.

1. Open "Run configurations" dialog
2.
a. To change Run Configuration Defaults

  • Press settings button
  • Choose RubyOnRails->RSpec default configuration params
    b. To change existing RSpec run configuration
  • select RSpec run configuration
    3. Disable checkBox "Enable coloured output"

Roman Chernyatchik - 01 Nov 07 17:15
If you want use coloured output in IDEA you should remove "win32console" gem and disable check
begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end

in method

def colour=(colour)
          @colour = colour
          begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end
end

But this fix will disabled colouring in windows console.


Brian Takita - 13 Nov 07 11:04
You can also make a feature request on the rspec project. Perhaps using the normal (non Win32) console coloring can be an option.

Roman Chernyatchik - 14 Nov 07 19:48
Brian, this is a good idea! i've created issue http://rubyforge.org/tracker/?func=detail&atid=3149&aid=15604&group_id=797 (#15604 Cannot use console colouring mode without "win32console" gem on Windows).

Roman Chernyatchik - 21 Aug 08 18:58
We've implemented our formatter, that doesn't use "colour" option. Thus issue is obsolete.

See Diana version, rev.203148