Sha256: 5906fecfae1433b53fd2568d46a5f473441ac4e0a26710329c8298d9dbbb5b9e

Contents?: true

Size: 655 Bytes

Versions: 20

Compression:

Stored size: 655 Bytes

Contents

require "minitest/autorun"
require "#{File.expand_path(File.dirname(__FILE__))}/../lib/traquitana.rb"

describe Traquitana::Cleaner do
   before do
      @cleaner = Traquitana::Cleaner.new 
      @config  = Traquitana::Config.instance
      @config.load
   end

   it "should have a run method" do
      @cleaner.must_respond_to :run  
   end

   it "should run cleaner on remote host" do
      network = MiniTest::Mock.new
      network.expect(:execute,nil,[["find #{@config.directory}/traq -type f -iname '*.zip' -o -iname '*.list' | sort | head -n-2 | xargs rm $1"]])
      @cleaner.network = network
      @cleaner.run
      network.verify
   end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
traquitana-0.1.2 spec/cleaner_spec.rb
traquitana-0.1.1 spec/cleaner_spec.rb
traquitana-0.1.0 spec/cleaner_spec.rb
traquitana-0.0.28 spec/cleaner_spec.rb
traquitana-0.0.27 spec/cleaner_spec.rb
traquitana-0.0.26 spec/cleaner_spec.rb
traquitana-0.0.25 spec/cleaner_spec.rb
traquitana-0.0.24 spec/cleaner_spec.rb
traquitana-0.0.23 spec/cleaner_spec.rb
traquitana-0.0.22 spec/cleaner_spec.rb
traquitana-0.0.21 spec/cleaner_spec.rb
traquitana-0.0.20 spec/cleaner_spec.rb
traquitana-0.0.19 spec/cleaner_spec.rb
traquitana-0.0.18 spec/cleaner_spec.rb
traquitana-0.0.17 spec/cleaner_spec.rb
traquitana-0.0.16 spec/cleaner_spec.rb
traquitana-0.0.15 spec/cleaner_spec.rb
traquitana-0.0.14 spec/cleaner_spec.rb
traquitana-0.0.13 spec/cleaner_spec.rb
traquitana-0.0.12 spec/cleaner_spec.rb