Sha256: 3b7631109fb2d81ebbd06a8674d7763714d91bc613a173e8dd8b615f6b8f657e

Contents?: true

Size: 1.77 KB

Versions: 21

Compression:

Stored size: 1.77 KB

Contents

#--
# Copyright: Copyright (c) 2010 RightScale, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# 'Software'), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to 
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

require File.join(File.dirname(__FILE__), 'spec_helper')
require 'scraper_base'

describe RightScale::ScraperBase do

  before(:each) do
    @base = RightScale::ScraperBase.new('/tmp', max_bytes=1024**2, max_seconds=20)
  end
  
  it 'should initialize the scrape directory' do
    @base.root_dir.should == '/tmp'
  end
  
  it 'should default to non incremental updates' do
    @base.send(:incremental_update?).should be_false
  end
    
  it 'should allow retrieving the download directory path' do
    repo_dir = RightScale::ScraperBase.repo_dir('root_dir', { :repo_type => :git, :url => 'git://github.com/rightscale/right_scraper.git' })
    repo_dir.should =~ /^root_dir\//
  end
  
end 

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
right_scraper-1.0.26 spec/scraper_base_spec.rb
right_scraper-1.0.25 spec/scraper_base_spec.rb
right_scraper-1.0.24 spec/scraper_base_spec.rb
right_scraper-1.0.23 spec/scraper_base_spec.rb
right_scraper-1.0.22 spec/scraper_base_spec.rb
right_scraper-1.0.21 spec/scraper_base_spec.rb
right_scraper-1.0.20 spec/scraper_base_spec.rb
right_scraper-1.0.19 spec/scraper_base_spec.rb
right_scraper-1.0.18 spec/scraper_base_spec.rb
right_scraper-1.0.17 spec/scraper_base_spec.rb
right_scraper-1.0.16 spec/scraper_base_spec.rb
right_scraper-1.0.15 spec/scraper_base_spec.rb
right_scraper-1.0.13 spec/scraper_base_spec.rb
right_scraper-1.0.12 spec/scraper_base_spec.rb
right_scraper-1.0.11 spec/scraper_base_spec.rb
right_scraper-1.0.10 spec/scraper_base_spec.rb
right_scraper-1.0.9 spec/scraper_base_spec.rb
right_scraper-1.0.8 spec/scraper_base_spec.rb
right_scraper-1.0.7 spec/scraper_base_spec.rb
right_scraper-1.0.6 spec/scraper_base_spec.rb