Sha256: 194b115a456a0acc8abb0ad91433fa6b7f7428562ada21c0692fc8265bf7df2b

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'crowdfavorite/tasks/localchanges'

describe CrowdFavorite::Tasks::LocalChanges, "loaded into capistrano" do
  before do
    @configuration = Capistrano::Configuration.new
    @configuration.extend(Capistrano::Spec::ConfigurationExtension)
    CrowdFavorite::Tasks::LocalChanges.load_into(@configuration)
  end

  it "defines cf:localchanges:snapshot" do
    @configuration.find_task('cf:localchanges:snapshot').should_not == nil
  end
  it "defines cf:localchanges:compare" do
    @configuration.find_task('cf:localchanges:compare').should_not == nil
  end
  it "defines cf:localchanges:allow_differences" do
    @configuration.find_task('cf:localchanges:allow_differences').should_not == nil
  end
  it "defines cf:localchanges:forbid_differences" do
    @configuration.find_task('cf:localchanges:forbid_differences').should_not == nil
  end
  it "sets snapshot_allow_differences to false" do
    @configuration.find_and_execute_task('cf:localchanges:forbid_differences')
    @configuration.fetch(:snapshot_allow_differences, nil).should === false
  end
  it "sets snapshot_allow_differences to true" do
    @configuration.find_and_execute_task('cf:localchanges:allow_differences')
    @configuration.fetch(:snapshot_allow_differences, nil).should === true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-wp-0.4.1 spec/localchanges_spec.rb