Sha256: cf50fac8f3d448235f4647be9e39f7beeff697555a8a6b6ab05595124a2af34b

Contents?: true

Size: 572 Bytes

Versions: 6

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

class NilPayloadMessaging < Slackistrano::Messaging::Default
  def payload_for_updating
    nil
  end
end

describe Slackistrano do
  before(:all) do
    set :slackistrano, { klass: NilPayloadMessaging }
  end

  it "does not post on updating" do
    expect_any_instance_of(Slackistrano::Capistrano).not_to receive(:post)
    Rake::Task["slack:deploy:updating"].execute
  end

  it "posts on updated" do
    expect_any_instance_of(Slackistrano::Capistrano).to receive(:post).and_return(true)
    Rake::Task["slack:deploy:updated"].execute
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
slackistrano-3.8.3 spec/nil_payload_spec.rb
slackistrano-3.8.2 spec/nil_payload_spec.rb
slackistrano-3.8.1 spec/nil_payload_spec.rb
slackistrano-3.1.1 spec/nil_payload_spec.rb
slackistrano-3.1.0 spec/nil_payload_spec.rb
slackistrano-3.1.0.beta spec/nil_payload_spec.rb