mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
20 lines
429 B
Ruby
20 lines
429 B
Ruby
ENV["CLARIFAI_API_KEY"] = "1234"
|
|
|
|
require "spec_helper"
|
|
require "clarifai"
|
|
require_relative "../support/clarifai_helpers"
|
|
|
|
describe Clarifai do
|
|
include ClarifaiHelpers
|
|
|
|
describe ".tags" do
|
|
it "predicts tags for our image" do
|
|
stub_clarifai(%w[computer technology])
|
|
|
|
clarifai_image = Clarifai.new("spec/fixtures/spectrum.jpg")
|
|
|
|
expect(clarifai_image.tags).to eq(%w[computer technology])
|
|
end
|
|
end
|
|
end
|