Sha256: 867e86eb9377d207842edacd1ff840d5689576588b0bf9b21c8b30fd771107e5

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

require_relative '../lib/findaface.rb'

describe Findaface, "has_face?" do
  it "finds faces" do
    Dir['spec/test_photos/has_face/*'].each do |path|
      Findaface.has_face?(path).should be_true
    end
  end

  it "doesn't give false positives" do
    Dir['spec/test_photos/no_face/*'].each do |path|
      Findaface.has_face?(path).should be_false
    end
  end

  it "returns false for group photos" do
    Dir['spec/test_photos/many_faces/*'].each do |path|
      Findaface.has_face?(path).should be_false
    end
  end

  it "returns false for photos with small faces" do
    Dir['spec/test_photos/small_faces/*'].each do |path|
      Findaface.has_face?(path).should be_false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
findaface-0.0.1 spec/findaface_spec.rb