Correcting the map crawler spec (derp!)
This commit is contained in:
parent
607a4158e1
commit
1b9c80d1ce
@ -5,12 +5,15 @@ describe MapCrawler do
|
|||||||
let(:subject) { MapCrawler.new(Setting.map(:base_url)) }
|
let(:subject) { MapCrawler.new(Setting.map(:base_url)) }
|
||||||
|
|
||||||
describe 'when crawling for actual maps', :integration => true do
|
describe 'when crawling for actual maps', :integration => true do
|
||||||
before(:each) do
|
it 'should increment the map count for each map found' do
|
||||||
Map.destroy_all
|
map_count = 0
|
||||||
|
count_increment = lambda do |n|
|
||||||
|
map_count += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should create Map entries for each map found' do
|
expect do
|
||||||
expect { subject.crawl }.to change{ Map.count }.by_at_least(1)
|
subject.crawl(count_increment)
|
||||||
|
end.to change{ map_count }.by_at_least(26)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user