Sha256: a1fc6a7e61130fc0fb2fac8b70a985f97d8dfbf01e4bed3b0dd7453d5e7a19b9
Contents?: true
Size: 1.12 KB
Versions: 5
Compression:
Stored size: 1.12 KB
Contents
describe SlackRubyBot::Client do describe '#send_gifs?' do context 'without giphy is false', unless: ENV.key?('WITH_GIPHY') do it 'by default' do expect(subject.send_gifs?).to be false end it 'when set to true' do subject.send_gifs = true expect(subject.send_gifs?).to be false end it 'when set to true via config' do SlackRubyBot::Config.send_gifs = true expect(SlackRubyBot::Config.send_gifs?).to be false end end context 'with giphy', if: ENV.key?('WITH_GIPHY') do it 'default is true' do expect(subject.send_gifs?).to be true end it 'defaults to SlackRubyBot::Config.send_gifs? if set' do SlackRubyBot::Config.send_gifs = false expect(subject.send_gifs?).to be false end it 'client setting takes precedence' do SlackRubyBot::Config.send_gifs = true subject.send_gifs = false expect(subject.send_gifs?).to be false SlackRubyBot::Config.send_gifs = false subject.send_gifs = true expect(subject.send_gifs?).to be true end end end end
Version data entries
5 entries across 5 versions & 1 rubygems