[rspec-devel] Fwd: Your message to rspec-users awaits moderator approval

David Chelimsky dchelimsky at gmail.com
Wed Mar 12 17:49:03 EDT 2008


On Wed, Mar 12, 2008 at 7:48 PM, Matt Aimonetti <matt at aimonetti.net> wrote:
> I recently forked the swx on rails plugin to fix few issues
> http://github.com/matta/swx-ruby/tree/master
>
> One of my problem is that RSpec totally freaks out because of the following
> code:
>
> ActionController::Base.class_eval do
>     def render_with_swx(options = nil, &block)
>       if options.is_a?(Hash) && options.keys.include?(:swx)
>         swf_bytecode = SwxAssembler.write_swf(
>                          options[:swx],
>                           params[:debug],
>                          SwxGateway.swx_config['compression_level'],
>                          params[:url],
>                          SwxGateway.swx_config['allow_domain']
>                         )
>         send_data(swf_bytecode, :type => 'application/swf', :filename =>
> 'data.swf')
>       else
>         render_without_swx(options, &block)
>       end
>     end
>      alias_method_chain :render, :swx
> end
>
> The problem is that rspec_on_rails subclasses render and passes 3 arguments(
> rspec_on_rails/lib/spec/rails/example/controller_example_group.rb:189:in
> `render' ) when the usual render method only has 2 arguments.

That's true as of 2.0, but before that it had 3 arguments.
rspec_on_rails is still supporting rails back to 1.2.3.

>
> That's obviously a major problem for me and I was wondering if there was a
> workaround that issue.

What version are you using? What you're talking about is not on line
189 in controller_example_group in HEAD.

>
>
> Thanks,
>
> -Matt
>
>
> _______________________________________________
>  rspec-devel mailing list
>  rspec-devel at rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list