Sha256: e98d38895bac7cf35820d53fb0e1b9ddb1f0cf5c9e64b594faf25ab8b6c64266

Contents?: true

Size: 742 Bytes

Versions: 11

Compression:

Stored size: 742 Bytes

Contents

require "spec_helper"
require "fileutils"

RSpec.describe Relaton::DbCache do
  it "creates default caches" do
    FileUtils.mv File.expand_path("~/.relaton"), "relaton1", force: true
    FileUtils.rm_rf %w(relaton)
    Relaton::DbCache.init_bib_caches(global_cache: true, local_cache: "", flush_caches: true)
    expect(File.exist?(File.expand_path("~/.relaton"))).to be true
    expect(File.exist?("relaton")).to be true
    FileUtils.mv "relaton1", File.expand_path("~/.relaton") if File.exist? "relaton1"
  end

  # it "returns fetched" do
  #   FileUtils.mv File.expand_path("~/.relaton"), "relaton1", force: true
  #   FileUtils.rm_rf %w(relaton)
  #   Relaton::DbCache.init_bib_caches(global_cache: true, local_cache: "")

  # end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
relaton-0.5.5 spec/relaton/db_cache_spec.rb
relaton-0.5.4 spec/relaton/db_cache_spec.rb
relaton-0.5.3 spec/relaton/db_cache_spec.rb
relaton-0.5.2 spec/relaton/db_cache_spec.rb
relaton-0.5.1 spec/relaton/db_cache_spec.rb
relaton-0.5.0 spec/relaton/db_cache_spec.rb
relaton-0.4.5 spec/relaton/db_cache_spec.rb
relaton-0.4.4 spec/relaton/db_cache_spec.rb
relaton-0.4.3 spec/relaton/db_cache_spec.rb
relaton-0.4.2 spec/relaton/db_cache_spec.rb
relaton-0.4.1 spec/relaton/db_cache_spec.rb