uriescape_spec.rb 603 B

123456789101112131415161718192021
  1. require 'spec_helper_acceptance'
  2. describe 'uriescape function' do
  3. describe 'success' do
  4. pp = <<-DOC
  5. $a = ":/?#[]@!$&'()*+,;= \\\"{}"
  6. $o = uriescape($a)
  7. notice(inline_template('uriescape is <%= @o.inspect %>'))
  8. DOC
  9. it 'uriescape strings' do
  10. apply_manifest(pp, :catch_failures => true) do |r|
  11. expect(r.stdout).to match(%r{uriescape is ":\/\?%23\[\]@!\$&'\(\)\*\+,;=%20%22%7B%7D"})
  12. end
  13. end
  14. it 'does nothing if a string is already safe'
  15. end
  16. describe 'failure' do
  17. it 'handles no arguments'
  18. it 'handles non strings or arrays'
  19. end
  20. end