Sha256: b68b967d8a771633ceb406681836da2de3808f8bb2bb057af16ac1d379e557af
Contents?: true
Size: 702 Bytes
Versions: 6
Compression:
Stored size: 702 Bytes
Contents
require 'adhearsion/component_manager/component_tester' begin require 'spec' rescue LoadError abort 'You do not have the "rspec" gem installed! You must install it to continue.\n\nsudo gem install rspec\n\n' end begin require 'rr' rescue LoadError abort 'You do not have the "rr" gem installed! You must install it to continue.\n\nsudo gem install rr\n\n' end module ComponentConfigurationSpecHelper def mock_component_config_with(new_config) Object.send(:remove_const, :COMPONENTS) rescue nil Object.send(:const_set, :COMPONENTS, OpenStruct.new(new_config)) end end Spec::Runner.configure do |config| config.mock_with :rr config.include ComponentConfigurationSpecHelper end
Version data entries
6 entries across 6 versions & 2 rubygems