module I18n::Tests::Interpolation

def capture(stream)

def capture(stream)
  begin
    stream = stream.to_s
    eval "$#{stream} = StringIO.new"
    yield
    result = eval("$#{stream}").string
  ensure
    eval("$#{stream} = #{stream.upcase}")
  end
  result
end

def euc_jp(string)

def euc_jp(string)
  string.encode!(Encoding::EUC_JP)
end

def interpolate(*args)

def interpolate(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  key = args.pop
  I18n.backend.translate('en', key, options)
end