Sha256: 57d2bc7dfe6ede34359bf501abcc547878ba69e6c0589e3896e9ac8ffbd1be84

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

class MockRender
  def initialize(template_path = 'contacts/index.html.erb')
    @template_path = template_path
  end
  def template_path; @template_path; end
end

class MockView
  include PageTitleHelper
  
  def initialize(template_path = 'contacts/index.html.erb')
    @_first_render = MockRender.new template_path
  end
  
  def content_for(sym, &block)
    instance_variable_set('@content_for_' + sym.to_s, yield)
  end
  
  def controller; nil; end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page_title_helper-0.7.1 test/mocks.rb
page_title_helper-0.7.0 test/mocks.rb