Sha256: aace36d79f77d3053461dab70f4649c59b7b6958df2bddffcee5df06e748a9ba
Contents?: true
Size: 1.71 KB
Versions: 2
Compression:
Stored size: 1.71 KB
Contents
# frozen_string_literal: true require 'avm/git/launcher_stereotypes/git_subrepo/warp' RSpec.describe Avm::Git::LauncherStereotypes::GitSubrepo::Warp do describe '#unknown' do before do temp_context(::File.join(__dir__, 'warp_spec_settings.yml')) @repos = init_remote('mylib_repos') wc = init_git('mylib_wc') touch_commit(wc, 'file1') wc.execute!('remote', 'add', 'origin', @repos) wc.execute!('push', 'origin', 'master') @app1 = init_git('app1') touch_commit(@app1, 'file2') @app1.execute!('subrepo', 'clone', @repos, 'mylib') @app2 = init_git('app2') touch_commit(@app2, 'file3') @app2.execute!('subrepo', 'clone', @repos, 'mylib') touch_commit(@app2, 'mylib/file4') @app2.execute!('subrepo', 'push', 'mylib') end it 'revisions should match' do # rubocop:disable RSpec/ExampleLength master_ref = @repos.rev_parse('master') expect(master_ref.present?).to be true master_ref_previous = @repos.rev_parse('master^') expect(master_ref_previous.present?).to be true @app2.execute!('subrepo', 'branch', 'mylib', '--fetch', '--force') expect(@app2.rev_parse('subrepo/mylib')).to eq master_ref @app1.execute!('subrepo', 'branch', 'mylib', '--fetch', '--force') expect(@app1.rev_parse('subrepo/mylib')).to eq master_ref_previous instance = ::Avm::Launcher::Context.current.instance('/app1/mylib') expect(instance).to be_a ::Avm::Launcher::Instances::Base warp = instance.warped expect(warp).to be_a ::Avm::Git::LauncherStereotypes::GitSubrepo::Warp wgit = ::Avm::Git::Launcher::Base.new(warp) expect(wgit.rev_parse('HEAD')).to eq master_ref_previous end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eac_tools-0.85.1 | sub/avm-tools/spec/lib/avm/projects/stereotypes/git_subrepo/warp_spec.rb |
eac_tools-0.85.0 | sub/avm-tools/spec/lib/avm/projects/stereotypes/git_subrepo/warp_spec.rb |