[rspec-devel] [ rspec-Bugs-13020 ] ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods should not be included in helper specs?

noreply at rubyforge.org noreply at rubyforge.org
Mon Aug 20 21:26:01 EDT 2007


Bugs item #13020, was opened at 2007-08-12 21:39
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13020&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Mike Vincent (agile)
Assigned to: Nobody (None)
Summary: ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods should not be included in helper specs?

Initial Comment:
1.0.6+ includes additional modules into the helper specs. 

including ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods

causes conflicts in helpers as it redefines several methods, such as << 

def simple_example(name)
  markup = ''
  markup << content_tag(:h1, "hello #{name}")
  markup
end

simple_example('foo').should have_tag('h1', 'foo')


will throw a confusing method missing error from nil about the << method.








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

>Comment By: Mike Vincent (agile)
Date: 2007-08-20 20:26

Message:
I think maybe I wasn't clear in the original message. I
don't believe the GeneratorMethods module is intended to be
mixed into the helper context and breaks things while it is
included. 

Not much clearer, I know. Someday me speak gooder.

Index:
vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/helper.rb
===================================================================
---
vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/helper.rb
       (revision 2411)
+++
vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/helper.rb
       (working copy)
@@ -32,7 +32,7 @@
           include ActionView::Helpers::NumberHelper
           include ActionView::Helpers::PaginationHelper
rescue nil #removed after 1.2.3
           include ActionView::Helpers::PrototypeHelper
-          include
ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
+          #include
ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
           include ActionView::Helpers::ScriptaculousHelper
           include ActionView::Helpers::TagHelper
           include ActionView::Helpers::TextHelper


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

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


More information about the rspec-devel mailing list