[rspec-devel] [ rspec-Bugs-6608 ] RSpec 0.7.1 with ZenTest 3.4.2 raise TypeError on TestSession

noreply at rubyforge.org noreply at rubyforge.org
Fri Nov 10 14:10:05 EST 2006


Bugs item #6608, was opened at 2006-11-10 10:35
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6608&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Shintaro Kakutani (kakutani)
Assigned to: Nobody (None)
Summary: RSpec 0.7.1 with ZenTest 3.4.2 raise TypeError on TestSession

Initial Comment:
ZenTest 3.4.2 defines TestSession is a Hash in their test_help.rb,
althought Rails doesn't so neither pre-1.2 nor edge. 
I don't know why they've done that in 3.4.2 as I couldn't find ZenTest src repository...

$ pwd
/Users/shintaro/svn/rspec/trunk/vendor/rspec_on_rails
$ script/generate rspec
      exists  spec
   identical  spec/spec_helper.rb
   identical  script/rails_spec
   identical  script/rails_spec_server
$ rake -q spec:app
(in /Users/shintaro/svn/rspec/trunk/vendor/rspec_on_rails)
/Users/shintaro/gem.repos/gems/ZenTest-3.4.2/test/test_help.rb:5: superclass mismatch for class TestSession (TypeError)
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from /Users/shintaro/gem.repos/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
	from /Users/shintaro/gem.repos/gems/ZenTest-3.4.2/lib/test/rails.rb:2
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `gem_original_require'
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require'
	from /Users/shintaro/gem.repos/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
	from /Users/shintaro/svn/rspec/trunk/vendor/rspec_on_rails/vendor/plugins/rspec/lib/extensions/test/rails.rb:2
	 ... 11 levels...
	from /Users/shintaro/svn/rspec/trunk/lib/spec/runner/command_line.rb:21:in `run'
	from /Users/shintaro/svn/rspec/trunk/lib/spec/runner/command_line.rb:15:in `each'
	from /Users/shintaro/svn/rspec/trunk/lib/spec/runner/command_line.rb:15:in `run'
	from /Users/shintaro/svn/rspec/trunk/bin/spec:4
... << snip (reoccurred in other 3 specs) >> ...
rake aborted!
RSpec failures

(See full trace by running task with --trace)


----------------------------------------------------------------------

Comment By: Wilson Bilkovich (wilson)
Date: 2006-11-10 14:10

Message:
I ran into this as well.
As a (scary) workaround, I inserted this before line 5 in test_help.rb:
ActionController.send(:remove_const, :TestSession)

----------------------------------------------------------------------

Comment By: Shintaro Kakutani (kakutani)
Date: 2006-11-10 11:04

Message:
Is it a ZenTest's bug?

--- test_help.rb.orig   2006-11-11 00:58:17.000000000 +0900
+++ test_help.rb        2006-11-11 00:58:33.000000000 +0900
@@ -1,8 +1,8 @@
 # ActionPack
 module ActionController; end
 module ActionController::Flash; end
-class ActionController::Flash::FlashHash; end
-class ActionController::TestSession < Hash; end
+class ActionController::Flash::FlashHash < Hash; end
+class ActionController::TestSession; end
 
 class ActionController::TestRequest
   attr_accessor :session


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6608&group_id=797


More information about the rspec-devel mailing list