Module: Spec::Rails::Example::ControllerExampleGroup::TemplateIsolationExtensions

Defined in:
lib/spec/rails/example/controller_example_group.rb

Defined Under Namespace

Classes: PickedTemplate

Instance Method Summary collapse

Instance Method Details

#_pick_template(*args) ⇒ Object

Rails 2.2



163
164
165
166
# File 'lib/spec/rails/example/controller_example_group.rb', line 163

def _pick_template(*args)
  @_first_render ||= args[0] unless args[0] =~ /^layouts/
  PickedTemplate.new
end

#file_exists?(ignore) ⇒ Boolean

Returns:

  • (Boolean)


156
# File 'lib/spec/rails/example/controller_example_group.rb', line 156

def file_exists?(ignore); true; end

#render(*args) ⇒ Object



168
169
170
171
# File 'lib/spec/rails/example/controller_example_group.rb', line 168

def render(*args)
  return super if Hash === args.last && args.last[:inline]
  @_rendered ? record_render(args[0]) : super
end

#render_file(*args) ⇒ Object



158
159
160
# File 'lib/spec/rails/example/controller_example_group.rb', line 158

def render_file(*args)
  @first_render ||= args[0] unless args[0] =~ /^layouts/
end