Sha256: 5b01899a49156578177d8b4ca5d8f041ca26433884b1e3e6be201e9670ed4b23
Contents?: true
Size: 834 Bytes
Versions: 4
Compression:
Stored size: 834 Bytes
Contents
require 'spec_helper' describe ModuleSync do context '::update' do it 'loads the managed modules from the specified :managed_modules_conf' do allow(ModuleSync).to receive(:find_template_files).and_return([]) allow(ModuleSync::Util).to receive(:parse_config).with('./config_defaults.yml').and_return({}) expect(ModuleSync).to receive(:managed_modules).with('./test_file.yml', nil, nil).and_return([]) options = { managed_modules_conf: 'test_file.yml' } ModuleSync.update(options) end end context '::pr' do describe "Raise Error" do it 'raises an error when neither GITHUB_TOKEN nor GITLAB_TOKEN are set for PRs' do expect { ModuleSync.pr({}) }.to raise_error(RuntimeError).and output(/No GitHub or GitLab token specified for --pr/).to_stderr end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
modulesync-2.0.2 | spec/unit/modulesync_spec.rb |
modulesync-2.0.1 | spec/unit/modulesync_spec.rb |
modulesync-2.0.0 | spec/unit/modulesync_spec.rb |
modulesync-1.3.0 | spec/unit/modulesync_spec.rb |