lawrencepit / remarkable_paperclip
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon May 25 01:22:01 -0700 2009 | |
| |
MIT-LICENSE | Mon May 25 01:22:01 -0700 2009 | |
| |
README.markdown | Fri Oct 09 01:03:46 -0700 2009 | |
| |
Rakefile | Mon May 25 01:22:01 -0700 2009 | |
| |
init.rb | Mon May 25 05:07:15 -0700 2009 | |
| |
lib/ | Sat May 30 00:00:30 -0700 2009 | |
| |
locale/ | Sat May 30 00:00:30 -0700 2009 | |
| |
remarkable_paperclip.gemspec | Sat May 30 00:00:30 -0700 2009 | |
| |
spec/ | Sat May 30 00:00:30 -0700 2009 |
README.markdown
Remarkable Paperclip
Test matchers to test Paperclip with Remarkable.
Usage
it { should have_attached_file :avatar, :styles => { :ico => "16x16", :normal => "48x48" } }
it { should validate_attachment_presence :avatar }
it { should validate_attachment_size :avatar, :less_than => 1.megabyte }
it { should validate_attachment_content_type :avatar, :allows => ["image/png", "image/jpg"], :rejects => ["video/mpeg"] }
Installation
As a Gem
Use this if you prefer to use versioned releases of remarkable_paperclip. Specify the gem dependency in your config/environments/test.rb file:
Rails::Initializer.run do |config|
config.gem "remarkable_paperclip", :lib => false, :source => "http://gemcutter.org"
end
Then:
$ rake gems:install
$ rake gems:unpack
Then require remarkable_paperclip from your spec/spec_helper.rb file, before Spec::Runner is configured:
# requires for RSpec
require 'remarkable_paperclip'
Spec::Runner.configure do |config|
# ...
As a Plugin
Use this if you prefer to use the edge version of remarkable_paperclip:
$ script/plugin install git://github.com/lawrencepit/remarkable_paperclip.git
Credits
Written by Lawrence Pit.
Thanks to Remarkable and Paperclip.
Copyright (c) 2009 Lawrence Pit, released under the MIT license
