Sha256: 75db93d51f44fbd724e6b91f04eb92deca673dfc21e4e462670c18718b9911b8

Contents?: true

Size: 709 Bytes

Versions: 12

Compression:

Stored size: 709 Bytes

Contents

require "minitest_helper"
require 'alula/storage'
require 'ostruct'

describe "Storage" do
  before do
    @site = MiniTest::Mock.new
    @site.expect :config, OpenStruct.new({})
  end
  
  it "loads proper provider" do
    puts ":: #{@site.config.storage.inspect}"
    @site.config.storage = {"none" => {}}
    storage = Alula::Storage.load(site: @site)
    storage.must_be_nil
    
    @site.config.storage = {"file" => { "content_path" => 'test/fixtures', "pages_path" => 'test/fixtures/pages',
      "posts_path" => 'test/fixtures/posts', "attachments_path" => 'test/fixtures/attachments', "public_path" => 'public' }}
    storage = Alula::Storage.load(site: @site)
    storage.wont_be_nil
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alula-0.4.10 test/test_storage.rb
alula-0.4.9 test/test_storage.rb
alula-0.4.8 test/test_storage.rb
alula-0.4.7 test/test_storage.rb
alula-0.4.6 test/test_storage.rb
alula-0.4.5 test/test_storage.rb
alula-0.4.4 test/test_storage.rb
alula-0.4.3 test/test_storage.rb
alula-0.4.2 test/test_storage.rb
alula-0.4.1 test/test_storage.rb
alula-0.4.0 test/test_storage.rb
alula-0.4.0b test/test_storage.rb