Sha256: bfbb1fde06ff44e1385bf610e542ea2f4559237dd89cdae6ca70396eb2093cbf
Contents?: true
Size: 969 Bytes
Versions: 19
Compression:
Stored size: 969 Bytes
Contents
require "spec_helper" describe Redcar::Plugin::Storage do it "should be based on Redcar::Plugin::BaseStorage" do Redcar::Plugin::Storage.ancestors.should include(Redcar::Plugin::BaseStorage) end it "should have a default storage path" do Redcar::Plugin::Storage.storage_dir.should == File.join(Redcar.user_dir, "storage") end it "should have a configurable storage path" do old_storage_dir = Redcar::Plugin::Storage.storage_dir Redcar::Plugin::Storage.storage_dir = File.dirname(__FILE__) Redcar::Plugin::Storage.storage_dir.should == File.dirname(__FILE__) Redcar::Plugin::Storage.storage_dir = old_storage_dir end it "should store files inside the directory specified by storage path" do Redcar::Plugin::Storage.storage_dir = File.dirname(__FILE__) storage = Redcar::Plugin::Storage.new('test_storage') storage.send(:path).should == File.join(File.dirname(__FILE__), 'test_storage.yaml') end end
Version data entries
19 entries across 19 versions & 2 rubygems