Sha256: 6c9ebb3177d1dac9ee09e31b0189d241d3028abcac4c67c2f4b0fdbd2d967fa4

Contents?: true

Size: 587 Bytes

Versions: 25

Compression:

Stored size: 587 Bytes

Contents

require 'bandiera/client'
require 'pugin/bandiera'

module Parliament
  module Utils
    module TestHelpers
      module BandieraHelper
        def self.load_rspec_config(config)
          #Stubs Bandiera::Client methods enabled? and get_features_for_group to clean up logs
          #and streamline cassettes
          config.before(:each) do
            allow(BANDIERA_CLIENT).to receive(:enabled?).and_return(false)
            allow(Pugin::PuginBandieraClient::BANDIERA_CLIENT).to receive(:get_features_for_group).and_return({})
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
parliament-utils-0.2.3 lib/parliament/utils/test_helpers/bandiera_helper.rb
parliament-utils-0.2.2 lib/parliament/utils/test_helpers/bandiera_helper.rb
parliament-utils-0.2.1 lib/parliament/utils/test_helpers/bandiera_helper.rb
parliament-utils-0.2.0 lib/parliament/utils/test_helpers/bandiera_helper.rb
parliament-utils-0.1.0 lib/parliament/utils/test_helpers/bandiera_helper.rb