vendor/gems/flexmock-0.8.5/lib/flexmock/rails/view_mocking.rb
def should_render_view_after_version_124(template_name)
      view = flexmock("MockView")
      view.should_receive(
        :assigns => {},
        :render_file => true,
        :template_format => :dummy_format,
        :view_paths => :dummy_view_paths,
        :pick_template_extension => :dummy_extension
        )
      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)
      
      # The number of times this is called changes from version 1.2.6
      # to 2.0.  The important thing is that it is checked at least once.
      flexmock(@response).should_receive(:template).and_return(view).
        at_least.once
    end
# This version of should_render_view will work with versions of
# Rails after Version 1.2.4.
This version of should_render_view will work with versions of
Rails after Version 1.2.4.
This version of should_render_view will work with versions of Rails after Version 1 . 2 . 4 .
def should_render_view_after_version_124(template_name)
      view = flexmock("MockView")
      view.should_receive(
        :assigns => {},
        :render_file => true,
        :template_format => :dummy_format,
        :view_paths => :dummy_view_paths,
        :pick_template_extension => :dummy_extension
        )
      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)
      flexmock(@response).should_receive(:template).and_return(view).
        at_least.once
    end
def should_render_view_after_version_124 ( template_name ) view = flexmock ( "MockView" ) view . should_receive ( :assigns => { } , :render_file => true , :template_format => :dummy_format , :view_paths => :dummy_view_paths , :pick_template_extension => :dummy_extension ) 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 ) flexmock ( @response ) . should_receive ( :template ) . and_return ( view ) . at_least . once end
This version of should_render_view will work with versions of
Rails after Version 1.2.4.
This version of should_render_view will work with versions of Rails after Version 1 . 2 . 4 .
# The number of times this is called changes from version 1.2.6 # to 2.0.  The important thing is that it is checked at least once.
template_name