Sha256: 8930d53829e3615e8faa9be4c27476c3cd9f6b764970d02765b7eeda58187f67
Contents?: true
Size: 1.4 KB
Versions: 4
Compression:
Stored size: 1.4 KB
Contents
# -*- coding: utf-8 -*- require 'spec_helper' describe NijigazouSokuhou do let(:url) { 'http://nijigazo.2chblog.jp/archives/52249806.html' } subject { @dl = NijigazouSokuhou.new(url) } before do fake(:get, url, 'nijigazou_sokuhou/middle.html') EroGetter.stub(:mkdir) end describe :sample do context :first_page do before do fake(:get, url, 'nijigazou_sokuhou/first.html') end its(:next) { should == url } its(:prev) { should be_nil } end context :middle do before do fake(:get, url, 'nijigazou_sokuhou/middle.html') end its(:name) { should == '二次画像速報' } its(:title) { should == '二次画像速報 : 【けいおん!】中野梓【あずにゃん】 その2' } its(:title_part) { should == '【けいおん!】中野梓【あずにゃん】' } its("targets.count") { should == 50 } its("targets.first") { should == "http://img03.nijigazo.com/2012/05/11/azusa/0511azusa_0051.jpg" } its(:sub_directory) { should == 'azusa/20120511' } its(:prev) { should == 'http://nijigazo.2chblog.jp/archives/52249804.html' } its(:next) { should == 'http://nijigazo.2chblog.jp/archives/52249808.html' } end context :last do before do fake(:get, url, 'nijigazou_sokuhou/last.html') end its(:next) { should be_nil } its(:prev) { should == url } end end end
Version data entries
4 entries across 4 versions & 1 rubygems