Sha256: c57a839b20a0ce7209764d93596ae7144bbc125ff68bb62c9a8257ee34fc0a42

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe Slackistrano do
  before(:each) do
    Rake::Task['load:defaults'].execute
  end

  describe "before/after hooks" do

    it "invokes slack:deploy:updating before deploy:updating" do
      expect(Rake::Task['deploy:updating'].prerequisites).to include 'slack:deploy:updating'
    end

    it "invokes slack:deploy:reverting before deploy:reverting" do
      expect(Rake::Task['deploy:reverting'].prerequisites).to include 'slack:deploy:reverting'
    end

    it "invokes slack:deploy:updated after deploy:finishing" do
      expect(Rake::Task['slack:deploy:updated']).to receive(:invoke)
      Rake::Task['deploy:finishing'].execute
    end

    it "invokes slack:deploy:reverted after deploy:finishing_rollback" do
      expect(Rake::Task['slack:deploy:reverted']).to receive(:invoke)
      Rake::Task['deploy:finishing_rollback'].execute
    end

    it "invokes slack:deploy:failed after deploy:failed" do
      expect(Rake::Task['slack:deploy:failed']).to receive(:invoke)
      Rake::Task['deploy:failed'].execute
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slackistrano-3.0.1 spec/task_hooks_spec.rb
slackistrano-3.0.0 spec/task_hooks_spec.rb
slackistrano-2.0.1 spec/task_hooks_spec.rb