Sha256: 2dd57b530019022ffeb915a2d08588fce534dd284ab9a1f302c4ff538eecbe84

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

require File.expand_path("spec/spec_helper")
require File.expand_path("lib/url_trimmer/differ")

module URLTrimmer
  describe Differ do
    describe ".between(urls1, urls2)" do
      let(:urls1) { %w(http://www.google.com/1 https://www.google.com.ar/2) }
      let(:urls2) do
        %w(https://www.google.com/3 http://www.google.com.ar/4 http://www.google.com.br/5 http://www.example.com/6)
      end
      
      it "removes URLs from urls2 already present in urls1" do
        unique_urls = Differ.between(urls1, urls2)
        
        unique_urls.size.must_equal 2
        unique_urls.must_include("http://www.google.com.br/5")
        unique_urls.must_include("http://www.example.com/6")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
url_trimmer-0.1.0 spec/lib/url_trimmer/differ_spec.rb