technicalpickles/capistrano-spec — pull request #7 by jgraichen (2013-04-07 16:10:56+00:00)
Title: Flexible uploaded matcher

I've made the `have_uploaded` matcher more flexible to allow testing only for source or target path. I need this to test if a generated tar file was uploaded. Therefore I cannot specify a source path as it is some random temp file name.

See the specs on how to use:

```ruby
describe 'Capistrano uploaded' do
# ...
it 'some file' do
@configuration.upload 'source.file', 'target.file'
@configuration.should have_uploaded
end

it 'a specific file to a specific location' do
@configuration.upload_from_to
@configuration.should have_uploaded('source.file').to('target.file')
end

it 'a specific file to some location' do
@configuration.upload_from
@configuration.should have_uploaded('source.file')
end

it 'some file to a specific location' do
@configuration.upload_to
@configuration.should have_uploaded.to('target.file')
end
end
```