Skip to content

Commit

Permalink
use new flexmock syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
g-arjones committed Jul 10, 2024
1 parent 48eef54 commit ac464bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
ruby-version:
- "3.0"
- "2.7"
- "2.6"
- "2.5"

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
ruby-version:
- "3.0"
- "2.7"
- "2.6"
- "2.5"

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion autobuild.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'tty-screen', '~> 0.8.0'
s.add_runtime_dependency "utilrb", "~> 3.0", ">= 3.0"
s.add_development_dependency "fakefs"
s.add_development_dependency "flexmock", '~> 2.0', ">= 2.0.0"
s.add_development_dependency "flexmock"
s.add_development_dependency "minitest", "~> 5.0", ">= 5.0"
s.add_development_dependency "simplecov"
s.add_development_dependency "timecop"
Expand Down
6 changes: 4 additions & 2 deletions test/import/test_git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
any, :import, 'git', 'clone', '-o', 'autobuild',
File.join(tempdir, 'gitrepo.git'),
File.join(tempdir, 'git'), any
)
).with_any_kw_args

flexmock(Autobuild::Subprocess).should_receive(:run).pass_thru

Expand All @@ -297,7 +297,7 @@ def assert_clone(*args)
any, :import, 'git', 'clone', '-o', 'autobuild', *args,
File.join(tempdir, 'gitrepo.git'),
File.join(tempdir, 'git'), any
).once.pass_thru
).with_any_kw_args.once.pass_thru

flexmock(Autobuild::Subprocess).should_receive(:run).pass_thru
end
Expand Down Expand Up @@ -992,6 +992,7 @@ def pin_importer(id, options = Hash.new)
.should_receive(:run)
.with(any, :import, 'git', '--git-dir', File.join(pkg.srcdir, ".git"),
'symbolic-ref', "refs/remotes/autobuild/HEAD", any)
.with_any_kw_args
.once
.and_return(['refs/remotes/autobuild/temp/branch', 'bla'])
flexmock(Autobuild::Subprocess).should_receive(:run).pass_thru
Expand Down Expand Up @@ -1027,6 +1028,7 @@ def pin_importer(id, options = Hash.new)
any, :import, 'git', 'ls-remote', '--symref',
File.join(tempdir, 'gitrepo-nomaster.git'), any
)
.with_any_kw_args
.once
.and_return(['ref: refs/heads/temp/branch HEAD', 'bla'])
flexmock(Autobuild::Subprocess).should_receive(:run).pass_thru
Expand Down

0 comments on commit ac464bc

Please sign in to comment.