Sha256: 3c50f224f011f821a19c5b3a427a101844dc6b3f30db9aa6ed3302cc1f89ed3d
Contents?: true
Size: 755 Bytes
Versions: 3
Compression:
Stored size: 755 Bytes
Contents
require 'lib/file_actioner.rb' describe FileActioner do it "Should get filtered files and send them to action" do files = { :all => ['/path/to.file'], :filtered => ['/path/to.file'] } ff = mock('file finder') ff.should_receive(:find).and_return(files) tm = mock('TaskManager') tm.should_receive(:run).with(files) fa = FileActioner.new(ff, tm) fa.run end it "should not run the actions if no filtered files" do files = { :all => ['/path/to.file'], :filtered => [] } ff = mock('file finder') ff.should_receive(:find).and_return(files) tm = mock('TaskManager') tm.should_not_receive(:run) fa = FileActioner.new(ff, tm) fa.run end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
karl-loris-0.0.10 | spec/file_actioner_spec.rb |
karl-loris-0.0.11 | spec/file_actioner_spec.rb |
loris-0.0.12 | spec/file_actioner_spec.rb |