vendor/gems/flexmock-0.8.5/lib/flexmock/rails/view_mocking.rb
def should_render_view_after_version_202(template_name)
      viewmock = flexmock("ViewMock")
      viewmock.should_receive(
        :assigns => {},
        :pick_template_extension => ".html",
        :template_format =>nil,
        :view_paths => nil,
        :file_exists? => true,
        :first_render => "")
      if template_name
        viewmock.should_receive(:render_file).with(/\/#{template_name}$/, any, any).
          and_return(nil).once
        viewmock.should_receive(:render_file).and_return(nil)
      else
        viewmock.should_receive(:render_file).at_least.once.and_return(nil)
      end
      flexmock(ActionView::Base).should_receive(:new).and_return(viewmock)
    end
# This version of should_render_view will work with versions of
# Rails at Version 2.0.2 and after
This version of should_render_view will work with versions of
Rails at Version 2.0.2 and after
This version of should_render_view will work with versions of Rails at Version 2 . 0 . 2 and after
def should_render_view_after_version_202(template_name)
      viewmock = flexmock("ViewMock")
      viewmock.should_receive(
        :assigns => {},
        :pick_template_extension => ".html",
        :template_format =>nil,
        :view_paths => nil,
        :file_exists? => true,
        :first_render => "")
      if template_name
        viewmock.should_receive(:render_file).with(/\/#{template_name}$/, any, any).
          and_return(nil).once
        viewmock.should_receive(:render_file).and_return(nil)
      else
        viewmock.should_receive(:render_file).at_least.once.and_return(nil)
      end
      flexmock(ActionView::Base).should_receive(:new).and_return(viewmock)
    end
def should_render_view_after_version_202 ( template_name ) viewmock = flexmock ( "ViewMock" ) viewmock . should_receive ( :assigns => { } , :pick_template_extension => ".html" , :template_format => nil , :view_paths => nil , :file_exists? => true , :first_render => "" ) if template_name viewmock . should_receive ( :render_file ) . with ( / \/ #{ template_name } $ / , any , any ) . and_return ( nil ) . once viewmock . should_receive ( :render_file ) . and_return ( nil ) else viewmock . should_receive ( :render_file ) . at_least . once . and_return ( nil ) end flexmock ( ActionView :: Base ) . should_receive ( :new ) . and_return ( viewmock ) end
This version of should_render_view will work with versions of
Rails at Version 2.0.2 and after
This version of should_render_view will work with versions of Rails at Version 2 . 0 . 2 and after
template_name