Cucumber + spork: Unable to attach test reporter to framework

Hi

Yet another Spork + Teamcity problem :( and here I just got Rspec to work with Roman's help...

My cucumber tests run just fine. It just won't attach to the test framework. I have tried the suggestions here, with editing the cucumber.yml file, to no avail.

Here is my cucumber.yml file:

<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip



Cucumber output:

/Users/houen/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/houen/Dropbox/Rainmaking/betternow/website/betternow_rails/bnwebsite/script/cucumber /Users/houen/Dropbox/Rainmaking/betternow/website/betternow_rails/bnwebsite/features --expand --drb --color
Testing started at 12:30 AM ...
WARNING: You have set Rails' config.cache_classes to false (most likely in config/environments/cucumber.rb).  This setting is known to cause problems with database transactions. Set config.cache_classes to true if you want to use transactions.  For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165.
Disabling profiles...
Feature: Logging in and out
[...]



Also, although unrelated to RubyMine (i guess?) the tests suddenly choke on the database:

      cannot rollback - no transaction is active (SQLite3::SQLException)
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:97:in `close'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:97:in `ensure in prepare'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:97:in `prepare'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:134:in `execute'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:517:in `rollback'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.10/lib/active_record/connection_adapters/sqlite_adapter.rb:168:in `rollback_db_transaction'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/transaction.rb:17:in `clean'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/database_cleaner-0.6.7/lib/database_cleaner/base.rb:77:in `clean'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `block in clean'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `each'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `clean'
      /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-rails-1.0.2/lib/cucumber/rails/hooks/database_cleaner.rb:9:in `After'



Please help...
4 comments
Comment actions Permalink

Never mind, it works now ^^ found out i need to set the "Working directory:" path in Cucumber configuration as well.

0
Comment actions Permalink

Do you create run confiugrations from context menu? As far as I understand RubyMine didn't set working directory as RAILS_ROOT, right ?

0
Comment actions Permalink

No, I create them from the 'Edit configurations' menu

0
Comment actions Permalink

Aaah, ok. By the way RubyMine can automatically create and configure run configuration for current file/folder in project view or for current file/test for file opened in editor. See "run/debug/create" options in context menu.

0

Please sign in to leave a comment.