vendor/gems/flexmock-0.8.5/lib/flexmock/rails/view_mocking.rb
def should_render_view_prior_version_124(template_name) # :nodoc:
      view = flexmock("MockView")
      view.should_receive(
        :assigns => {},
        :render_file => true,
        :first_render => "dummy_template"
        )
      if template_name
        view.should_receive(:file_exists?).with(/#{template_name}$/).once.
          and_return(true)
      end
      view.should_receive(:file_exists?).with(any).and_return(true)
      view_class = flexmock("MockViewClasss")
      view_class.should_receive(:new).and_return(view)
      flexmock(@controller.class).should_receive(:view_class).once.
        and_return(view_class)
    end
# This version of should_render_view will work for Rails 1.2.4
# (and prehaps some number of prior versions).
This version of should_render_view will work for Rails 1.2.4
(and prehaps some number of prior versions).
This version of should_render_view will work for Rails 1 . 2 . 4 ( and prehaps some number of prior versions ) .
def should_render_view_prior_version_124(template_name) 
      view = flexmock("MockView")
      view.should_receive(
        :assigns => {},
        :render_file => true,
        :first_render => "dummy_template"
        )
      if template_name
        view.should_receive(:file_exists?).with(/#{template_name}$/).once.
          and_return(true)
      end
      view.should_receive(:file_exists?).with(any).and_return(true)
      view_class = flexmock("MockViewClasss")
      view_class.should_receive(:new).and_return(view)
      flexmock(@controller.class).should_receive(:view_class).once.
        and_return(view_class)
    end
def should_render_view_prior_version_124 ( template_name ) view = flexmock ( "MockView" ) view . should_receive ( :assigns => { } , :render_file => true , :first_render => "dummy_template" ) if template_name view . should_receive ( :file_exists? ) . with ( / #{ template_name } $ / ) . once . and_return ( true ) end view . should_receive ( :file_exists? ) . with ( any ) . and_return ( true ) view_class = flexmock ( "MockViewClasss" ) view_class . should_receive ( :new ) . and_return ( view ) flexmock ( @controller . class ) . should_receive ( :view_class ) . once . and_return ( view_class ) end
This version of should_render_view will work for Rails 1.2.4
(and prehaps some number of prior versions).
This version of should_render_view will work for Rails 1 . 2 . 4 ( and prehaps some number of prior versions ) .
# :nodoc:
template_name