Sha256: 92d18328bcc9cbd531f8efac5ec7c5ee26013a6d6401edc89db887ad8af00497

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 Bytes

Contents

RSpec.describe API::Giphy do
  let(:obj) { Object.new.extend(described_class) }

  before(:each) do
    config = Hibot.configure({path: File.expand_path("../../hibotrc", __FILE__)})
    Hibot.configure_hibot_giphy(config['Hibot::Giphy'.to_sym])
  end
  
  context "parse_uri method" do
    it "should return a message with an url if some gifs match the query" do
      expect(obj.search('funny cat')).to_not eq("Nothing found with that parameter.")
    end

    it "should return an error message if none gif is found with that query" do
      expect(obj.search('foobartest')).to eq("Nothing found with that parameter.")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hibot-0.0.4 spec/api/giphy_spec.rb
hibot-0.0.2 spec/api/giphy_spec.rb