File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ def ensure_open!
4242 def prolog_and_opening_tag
4343 tag = "<?xml version=\" 1.0\" encoding=\" UTF-8\" ?>\n "
4444 tag += "<!-- GIT_COMMIT:#{ ENV [ 'GIT_COMMIT' ] } -->\n "
45+ tag += "<!-- DOCKER_TAG:#{ ENV [ 'DOCKER_TAG' ] } -->\n "
46+ tag += "<!-- VERSION: 1.5.4 -->\n "
4547 tag += "<users>\n "
4648 tag
4749 end
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!-- GIT_COMMIT:LOCAL_TESTING -->
3+ <!-- DOCKER_TAG:DEV -->
4+ <!-- VERSION: 1.5.4 -->
35<users >
46<user >
57 <record_type >PUBLIC</record_type >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!-- GIT_COMMIT:LOCAL_TESTING -->
3+ <!-- DOCKER_TAG:DEV -->
4+ <!-- VERSION: 1.5.4 -->
35<users >
46<user >
57 <record_type >PUBLIC</record_type >
Original file line number Diff line number Diff line change 3737 Alma ::XMLWriter . open ( out ) { |w | w . write ( @student_rec ) }
3838 actual = File . read ( out )
3939 xml = Alma ::XMLBuilder . new ( @student_rec ) . build
40- expected = "<?xml version= \" 1.0 \" encoding= \" UTF-8 \" ?> \n <!-- GIT_COMMIT:LOCAL_TESTING --> \n < users>\n #{ xml } \n </users>"
41- expect ( actual ) . to eq ( expected )
40+ expected = "<users>\n #{ xml } \n </users>"
41+ expect ( actual ) . to include ( expected )
4242 end
4343 end
4444
5151 actual = File . read ( out )
5252
5353 xml = Alma ::XMLBuilder . new ( @student_rec ) . build
54- expected = "<?xml version= \" 1.0 \" encoding= \" UTF-8 \" ?> \n <!-- GIT_COMMIT:LOCAL_TESTING --> \n < users>\n #{ xml } \n </users>"
54+ expected = "<users>\n #{ xml } \n </users>"
5555
56- expect ( actual ) . to eq ( expected )
56+ expect ( actual ) . to include ( expected )
5757 end
5858 end
5959end
Original file line number Diff line number Diff line change 3939 # Mock ENVs for testing
4040 config . before ( :each ) do
4141 ENV [ 'GIT_COMMIT' ] = 'LOCAL_TESTING'
42+ ENV [ 'DOCKER_TAG' ] = 'DEV'
4243 end
4344
4445 config . color = true
You can’t perform that action at this time.
0 commit comments