lib/plugins/inspec-habitat/test/unit/profile_test.rb in inspec-4.7.3 vs lib/plugins/inspec-habitat/test/unit/profile_test.rb in inspec-4.7.18

- old
+ new

@@ -114,12 +114,12 @@ end def test_duplicate_profile current_profile = @test_profile duplicated_profile = @hab_profile.send(:duplicate_profile, - @test_profile_path, - @tmpdir) + @test_profile_path, + @tmpdir) assert duplicated_profile.is_a?(Inspec::Profile) assert duplicated_profile.sha256 == current_profile.sha256.to_s refute_same duplicated_profile.root_path, current_profile.root_path end @@ -128,12 +128,12 @@ assert profile.is_a?(Inspec::Profile) end def test_copy_profile_to_working_dir duplicated_profile = @hab_profile.send(:duplicate_profile, - @test_profile_path, - @tmpdir) + @test_profile_path, + @tmpdir) dst = File.join(@tmpdir, "working_dir") FileUtils.mkdir_p(dst) @hab_profile.send(:copy_profile_to_working_dir, duplicated_profile, dst) @@ -143,10 +143,11 @@ example.rb } actual_files = Dir.glob(File.join(dst, "**/*")).map do |path| next unless File.file?(path) + File.basename(path) end.compact assert(actual_files.sort == expected_files.sort) end @@ -173,11 +174,11 @@ mock.expect(:lockfile, mock_lock_file) mock.expect(:cache_path, mock_cache_path) Inspec::ProfileVendor.stub :new, mock do new_profile = @hab_profile.send(:vendor_profile_dependencies!, - @test_profile) + @test_profile) assert new_profile.is_a?(Inspec::Profile) end end def test_vendor_profile_dependencies @@ -189,10 +190,10 @@ mock.expect(:vendor!, nil) mock.expect(:make_readable, nil) Inspec::ProfileVendor.stub :new, mock do new_profile = @hab_profile.send(:vendor_profile_dependencies!, - @test_profile) + @test_profile) assert new_profile.is_a?(Inspec::Profile) end mock.verify end