Sha256: 10110c1f4499db74e24a7c7846b20ececeaa133f37b371fc4a584ab1a0e7751e

Contents?: true

Size: 634 Bytes

Versions: 6

Compression:

Stored size: 634 Bytes

Contents

require 'spec_helper'

describe FilePolice do
  
  describe "::patrol" do
    it "should return an array of tickets with violations" do
      tickets = FilePolice.patrol("spec/fixtures/bad")
      tickets.should be_kind_of Array
      tickets.first.should be_kind_of FilePolice::Ticket
      tickets.collect { |t| t.file unless t.violations.empty? }.should include "ARC0001_box11_FL1_name_001.tif"
    end

    it "should return an array of tickets without violations" do
      tickets = FilePolice.patrol("spec/fixtures/good")
      tickets.collect { |t| t.file unless t.violations.empty? }.compact.should be_empty
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
file_police-0.1.4 spec/police_spec.rb
file_police-0.1.3 spec/police_spec.rb
file_police-0.1.2 spec/police_spec.rb
file_police-0.1.1 spec/police_spec.rb
file_police-0.1.0 spec/police_spec.rb
file_police-0.0.1 spec/police_spec.rb