Sha256: 43b268c1a47ea214a5d62375b280e16ac8f82f1a3310d990e981415708766321

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
require 'file_manager'

describe FileManager, "swapping configuration" do
  before do
    @mvc = FileManager.new
  end
  
  it "should make a web.original.config before replacing file" do   
    FileUtils.stubs(:mv).with('test/web.systest.config', 'test/web.config')
    FileUtils.expects(:cp).with('test/web.config', 'test/web.original.config').once
    @mvc.swap_configs('test', :systest)    
  end
  
  it "should swap config for environment to web.config" do  
    FileUtils.stubs(:cp).with('test/web.config', 'test/web.original.config')
    FileUtils.expects(:mv).with('test/web.systest.config', 'test/web.config').once
    @mvc.swap_configs('test', :systest)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dolphindeploy-0.0.1 spec/file_manager_spec.rb