Sha256: 461244d5c78d2f8de02412441b93858aab4a3914ac7cb6a6bf85e26f8566b437
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
describe SlackRubyBot::Client do describe '#send_gifs?' do context 'without giphy is false', unless: WithGiphy.env? 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: WithGiphy.env? 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
slack-ruby-bot-0.12.0 | spec/slack-ruby-bot/client_spec.rb |
slack-ruby-bot-0.11.2 | spec/slack-ruby-bot/client_spec.rb |
slack-ruby-bot-0.11.1 | spec/slack-ruby-bot/client_spec.rb |