<commit_before>require 'spec_helper'
describe Flickr2Mosaic::FlickrSearch do

  #just for tdd: make sure the class is there
  it 'should be able to initialize the flickr search engine class' do
    expect{subject.class.new}.not_to raise_error
  end

  it 'should be able to search for a tag at flickr and to return a url' do
    VCR.use_cassette "search_tag_computer" do
      expect(subject.get_url_by_search_tag('computer')).to match( /^http/ )
    end
  end
end
<commit_msg>now including VCR to speed up tests<commit_after>require 'spec_helper'
describe Flickr2Mosaic::FlickrSearch do

  #just for tdd: make sure the class is there
  it 'should be able to initialize the flickr search engine class' do
    expect{subject.class.new}.not_to raise_error
  end

  it 'should be able to search for a tag at flickr and to return a url' do
    VCR.use_cassette "search_tag_computer" do
      expect(subject.get_url_by_search_tag('computer')).to match( /^http/ )
    end
  end

  it 'should be able to search for a tag at flickr and to return nil if nothing found' do
    VCR.use_cassette "search_tag_computer" do
      expect(subject.get_url_by_search_tag('computer')).to match( /^http/ )
    end
  end

end

{'fraction_non_alphanumeric': 0.07142857142857142, 'fraction_numerical': 0.0016611295681063123, 'mean_word_length': 3.8588709677419355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4867734', 'n_tokens_mistral': 404, 'n_tokens_neox': 387, 'n_words': 143}