Sha256: c50e28bee0308ba6d16668a2ed9a086b2b6a43af85a6eb13a6b248370ac0e694
Contents?: true
Size: 833 Bytes
Versions: 1
Compression:
Stored size: 833 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","icon_emoji":":ghost:","parse":"default","text":":boom:"}'} } let(:text) { context.fetch(:slack_text) } let(:builded_payload) { Payload.build context do |default, context| default[:text] = text default end } it 'returns the payload with the specified text' do expect(builded_payload).to eq payload end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-slackify-2.3.0 | spec/lib/slackify_spec.rb |