swapcase_spec.rb 505 B

1234567891011121314151617181920
  1. require 'spec_helper_acceptance'
  2. describe 'swapcase function' do
  3. describe 'success' do
  4. pp = <<-DOC
  5. $o = swapcase('aBcD')
  6. notice(inline_template('swapcase is <%= @o.inspect %>'))
  7. DOC
  8. it 'works with strings' do
  9. apply_manifest(pp, :catch_failures => true) do |r|
  10. expect(r.stdout).to match(%r{swapcase is "AbCd"})
  11. end
  12. end
  13. it 'works with arrays'
  14. end
  15. describe 'failure' do
  16. it 'handles no arguments'
  17. it 'handles non arrays or strings'
  18. end
  19. end