module TemplateModificationHelper

Private Instance Methods

modify_template(name) { || ... } click to toggle source
# File actionpack/test/controller/render_test.rb, line 261
def modify_template(name)
  path = File.expand_path("../fixtures/#{name}.erb", __dir__)
  original = File.read(path)
  File.write(path, "#{original} Modified!")
  ActionView::LookupContext::DetailsKey.clear
  yield
ensure
  File.write(path, original)
end