thoughtbot/paperclip — pull request #905 by phene (2012-06-05 21:28:44+00:00)
Title: Improved the coverage of character restriction logic, revealing bug with tildes

I discovered that I was receiving application errors when users uploaded files that began with '~'. Digging further, I decided to update the tests for character restrictions, revealing the source bug. I do not have a fix for it yet, but here are the tests and subsequent failure:

```
1) Error:
test: Attachment with reserved filename with default configuration with character ~ at beginning of filename should convert special character into underscore. (AttachmentTest):
ArgumentError: user filename20120605-88765-ojvnso.png doesn't exist
/Users/phene/projects/paperclip/lib/paperclip/io_adapters/file_adapter.rb:61:in `new'
/Users/phene/projects/paperclip/lib/paperclip/io_adapters/file_adapter.rb:61:in `copy_to_tempfile'
/Users/phene/projects/paperclip/lib/paperclip/io_adapters/file_adapter.rb:5:in `initialize'
/Users/phene/projects/paperclip/lib/paperclip/io_adapters/registry.rb:29:in `new'
/Users/phene/projects/paperclip/lib/paperclip/io_adapters/registry.rb:29:in `for'
/Users/phene/projects/paperclip/lib/paperclip/attachment.rb:91:in `assign'
/Users/phene/projects/paperclip/lib/paperclip.rb:194:in `block in has_attached_file'
/Users/phene/projects/paperclip/test/attachment_test.rb:760:in `block (6 levels) in '
```