File tree Expand file tree Collapse file tree
spec/octocatalog-diff/integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 end
3232
3333 context 'with --preserve-environments set' do
34+ context 'and --environment, --create-symlinks unset' do
35+ before ( :all ) do
36+ @result = OctocatalogDiff ::Integration . integration (
37+ spec_fact_file : 'facts.yaml' ,
38+ spec_repo : 'preserve-environments' ,
39+ argv : [
40+ '-n' , 'rspec-node.github.net' ,
41+ '--retry-failed-catalog' , '0' ,
42+ '--preserve-environments'
43+ ]
44+ )
45+ end
46+
47+ it 'should exit with error status' do
48+ expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
49+ end
50+
51+ it 'should raise OctocatalogDiff::CatalogDiff::Cli::Catalogs::CatalogError' do
52+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::CatalogDiff ::Cli ::Catalogs ::CatalogError )
53+ end
54+
55+ it 'should fail because ::bar could not be located' do
56+ expect ( @result . exception . message ) . to match ( /Could not find class ::bar for rspec-node.github.net/ )
57+ end
58+ end
59+
3460 context 'and --environment set to non-existent value' do
3561 before ( :all ) do
3662 @result = OctocatalogDiff ::Integration . integration (
You can’t perform that action at this time.
0 commit comments