Getting "<> expected but was <>" instead of having proper expected/actual values #33

Closed
webmat opened this Issue Jul 4, 2012 · 11 comments

Comments

Projects
None yet
4 participants

webmat commented Jul 4, 2012

Hey guys,

My failing tests were reporting "<> expected but was <>" instead of displaying the expected/actual values. 2.4.9 and 2.5.0 seem to have the issue.

Downgrading to 2.4.8 fixes the problem for me. Anyone else having this problem?

My stack:

  • Ruby 1.9.3p194 (fails the same way on 1.9.2p320)
  • Rails (2.3.6)
  • test-unit (2.4.9 or 2.5.0)
  • guard (1.2.3)
  • guard-test (0.5.0)
  • mocha (0.10.0)
  • factory_girl (2.2.0)
  • factory_girl_rails (1.3.0)
Member

trans commented Jul 4, 2012

I don't have an answer for you but I notice your stack is missing test-unit-rails. See if that makes a difference.

webmat commented Jul 4, 2012

Thanks for your response. That makes sense!

I've tried it however, and I'm getting the following:

undefined method `join' for nil:NilClass
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/capybara-1.1.2/lib/capybara/rails.rb:15:in `<top (required)>'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/gems/test-unit-rails-1.0.1/lib/test/unit/rails.rb:28:in `<top (required)>'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:74:in `require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:74:in `rescue in block in require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:62:in `block in require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:55:in `each'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler/runtime.rb:55:in `require'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.0.pre.1/lib/bundler.rb:126:in `require'
/Users/mat/work/socialgrapes/wine-companion/wine-companion/config/application.rb:27:in `<top (required)>'
/Users/mat/work/socialgrapes/wine-companion/wine-companion/Rakefile:5:in `require'
/Users/mat/work/socialgrapes/wine-companion/wine-companion/Rakefile:5:in `<top (required)>'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/bin/ruby_noexec_wrapper:14:in `eval'
/Users/mat/.rvm/gems/ruby-1.9.3-p194@socialgrapes2/bin/ruby_noexec_wrapper:14:in `<main>'

I've added gem 'test-unit-rails' to my Gemfile in the :test group, and I've added require 'test/unit/rails' in my test_helper.rb file. Anything I may be missing?

This is failing on the Rails.group line in config/application.rb. E.g.:

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end
Contributor

grosser commented Jul 4, 2012

same here with missing expected values, also solved via downgrade

Owner

kou commented Jul 5, 2012

Thanks for your report.
The problem had been fixed in #31.

I've released a new version, 2.5.1. Could you try it?

webmat commented Jul 5, 2012

Awesome, this fixes it for me. Thanks for your quick response :-)

Owner

kou commented Jul 5, 2012

Thanks for your quick confirmation! :-)

@kou kou closed this Jul 5, 2012

webmat commented Jul 5, 2012

I love the new diffs and error reports too :-) Keep up the good work!

Owner

kou commented Jul 5, 2012

Thanks 👅

Contributor

grosser commented Jul 5, 2012

thanks, works! :)

Contributor

grosser commented Jul 5, 2012

btw: even the dots now work without having to include test-unit-rails!

Owner

kou commented Jul 6, 2012

Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment