Sha256: 416f0c7b69df9769b4b7eaed751e2355c5949db78e1f9f0dd30e79b541f7a9ff

Contents?: true

Size: 1.75 KB

Versions: 5

Compression:

Stored size: 1.75 KB

Contents

require 'spec_helper'
      # http://www.arzberg-shop.de/product_info.php/(info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html)
describe ProductSpy, 'anzberg-shop.de' do
  context 'parse url' do
    it 'parses: https://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html' do
      host, pk = ProductSpy.parse('https://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html')
      host.should == 'www.arzberg-shop.de'
      pk.should == ['info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html']
    end

    it 'parses: http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html' do
      host, pk = ProductSpy.parse('http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html')
      host.should == 'www.arzberg-shop.de'
      pk.should == ['info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html']
    end

    it 'parses: http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html?x=y' do
      host, pk = ProductSpy.parse('http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html?x=y')
      host.should == 'www.arzberg-shop.de'
      pk.should == ['info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html']
    end
  end

  context 'build url' do
    it 'returns: http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html' do
      ProductSpy.build('www.arzberg-shop.de', ['info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html']).should == 'http://www.arzberg-shop.de/product_info.php/info/p9845_Kuchenplatte-eckig-35-cm------1382--Weiss.html'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
product_spy-0.0.6 spec/anzberg-shop.de_spec.rb
product_spy-0.0.5 spec/anzberg-shop.de_spec.rb
product_spy-0.0.4 spec/anzberg-shop.de_spec.rb
product_spy-0.0.3 spec/anzberg-shop.de_spec.rb
product_spy-0.0.2 spec/anzberg-shop.de_spec.rb