Sha256: b49145807f4b7e9ec1b4686f755c1de896d7b912bf1f4fc14fe3acca830611d4
Contents?: true
Size: 1.26 KB
Versions: 13
Compression:
Stored size: 1.26 KB
Contents
# -*- coding: UTF-8 -*- # # Copyright 2014 PagerDuty, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'spec_helper' describe LitaGithub::Filters do include LitaGithub::Filters describe '.func_disabled?' do before do @cfg = double('Lita::Configuration', test_enabled: true) allow(self).to receive(:config).and_return(@cfg) end context 'when enabled' do it 'should return false' do expect(func_disabled?(:test)).to be_falsey end end context 'when disabled' do before do @cfg = double('Lita::Configuration', test_enabled: false) allow(self).to receive(:config).and_return(@cfg) end it 'should return true' do expect(func_disabled?(:test)).to be_truthy end end end end
Version data entries
13 entries across 13 versions & 1 rubygems