Skip to content

Commit

Permalink
Add test for xtce files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Feb 9, 2017
1 parent 83d75c9 commit 1bed6bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/system/target_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ module Cosmos
File.open(File.join(cmd_tlm,'tlm2.txt'),'w') {}
File.open(File.join(cmd_tlm,'tlm2.txt~'),'w') {}
File.open(File.join(cmd_tlm,'tlm2.txt.mine'),'w') {}
File.open(File.join(cmd_tlm,'tlm3.xtce'),'w') {}
File.open(File.join(cmd_tlm,'tlm3.xtce~'),'w') {}
File.open(File.join(cmd_tlm,'tlm3.xtce.bak'),'w') {}

tgt = Target.new(tgt_name,nil,tgt_path)
expect(tgt.dir).to eql File.join(tgt_path,tgt_name)
files = Dir[File.join(cmd_tlm,'*.txt')]
files.concat(Dir[File.join(cmd_tlm,'*.xtce')])
expect(files).not_to be_empty
expect(tgt.cmd_tlm_files.length).to eql 4
expect(tgt.cmd_tlm_files.length).to eql 5
expect(tgt.cmd_tlm_files.sort).to eql files.sort

FileUtils.rm_r(tgt_path)
Expand Down

0 comments on commit 1bed6bb

Please sign in to comment.