public
Fork of dchelimsky/rspec-rails
Description: RSpec's official Ruby on Rails plugin
Homepage:
Clone URL: git://github.com/ianwhite/rspec-rails.git
Fix for render_partial when aliased before rspec
ianwhite (author)
Tue Apr 22 03:21:58 -0700 2008
commit  f6ac8cc8c37b9adf7167aa4cae96c1a2c49b44ab
tree    a17673d81f190a1dac86bb56488f659029e40b4b
parent  51477e207ad3ceb2fb8023b0e8ce09f0637188f5
...
2
3
4
 
5
6
7
...
10
11
12
13
 
14
15
16
...
2
3
4
5
6
7
8
...
11
12
13
 
14
15
16
17
0
@@ -2,6 +2,7 @@ module ActionView #:nodoc:
0
   class Base #:nodoc:
0
     include Spec::Rails::Example::RenderObserver
0
     cattr_accessor :base_view_path
0
+    alias_method :orig_render_partial, :render_partial
0
     def render_partial(partial_path, local_assigns = nil, deprecated_local_assigns = nil) #:nodoc:
0
       if partial_path.is_a?(String)
0
         unless partial_path.include?("/")
0
@@ -10,7 +11,7 @@ module ActionView #:nodoc:
0
           end
0
         end
0
       end
0
-      super(partial_path, local_assigns, deprecated_local_assigns)
0
+      orig_render_partial(partial_path, local_assigns, deprecated_local_assigns)
0
     end
0
 
0
     alias_method :orig_render, :render

Comments