Sha256: 3888c9046e89d14101d890007db3e11f87a416f904aa6538f93ac2f0c308e046
Contents?: true
Size: 859 Bytes
Versions: 15
Compression:
Stored size: 859 Bytes
Contents
shared_examples_for 'Metasploit::Concern.run' do let(:load_hook_name) { described_class.name.underscore.gsub('/', '_').to_sym } let(:loaded_bases_by_name) { ActiveSupport.module_eval { @loaded } } context 'with correct base' do it 'calls ActiveSupport.run_load_hooks with correct load hook name' do actual_names = [] loaded_bases_by_name.each do |name, bases| bases.each do |base| if base == described_class actual_names << name break end end end expect(actual_names).to include(load_hook_name) end end context 'with correct load hook name' do it 'calls ActiveSupport.run_load_hooks with correct base' do actual_bases = loaded_bases_by_name[load_hook_name] expect(actual_bases).to include(described_class) end end end
Version data entries
15 entries across 15 versions & 1 rubygems