Sha256: 9fd52e470761a71a3904bab462f2a1915916f4149dd7810f81007df5edfeccfc
Contents?: true
Size: 693 Bytes
Versions: 2
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' module Slackify describe Payload do describe '.build' do let(:context) { { slack_channel: '#general', slack_username:'Capistrano', slack_emoji: ':ghost:', slack_parse: 'default', slack_user: 'You', slack_text: ':boom:', } } let(:payload) { %{'payload={"channel":"#general","username":"Capistrano","text":":boom:","icon_emoji":":ghost:","parse":"default"}'} } let(:text) { context.fetch(:slack_text) } it 'returns the payload with the specified text' do expect(Payload.build(context, text)).to eq payload end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano-slackify-2.2.0 | spec/lib/slackify_spec.rb |
capistrano-slackify-2.1.0 | spec/lib/slackify_spec.rb |