|
11 | 11 | other_action_mock = double() |
12 | 12 | allow(Fastlane::Action).to receive(:other_action).and_return(other_action_mock) |
13 | 13 | allow(other_action_mock).to receive(:ensure_git_branch).with(branch: default_branch) |
14 | | - |
15 | | - allow(Fastlane::Helper::GitHelper).to receive(:checkout_and_pull).with(default_branch) |
16 | | - allow(Fastlane::Helper::GitHelper).to receive(:create_branch).with("release/#{next_version_short}", from: default_branch) |
17 | | - |
18 | 14 | allow(Fastlane::Helper::Ios::VersionHelper).to receive(:read_from_config_file).and_return(version) |
19 | | - allow(Fastlane::Helper::Ios::VersionHelper).to receive(:update_xc_configs).with(next_version, next_version_short, nil) |
20 | | - end |
21 | | - |
22 | | - it 'does the fastlane deliver update' do |
23 | | - skip_deliver = false |
24 | | - |
25 | | - expect(Fastlane::Helper::Ios::VersionHelper).to receive(:update_fastlane_deliver).with(next_version_short) |
26 | | - expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver) |
27 | | - |
28 | | - run_described_fastlane_action( |
29 | | - skip_deliver: skip_deliver, |
30 | | - default_branch: default_branch |
31 | | - ) |
32 | 15 | end |
33 | 16 |
|
34 | | - it 'skips the fastlane deliver update properly' do |
35 | | - skip_deliver = true |
| 17 | + it 'correctly uses the next version, short and long' do |
| 18 | + expect(Fastlane::Helper::GitHelper).to receive(:checkout_and_pull).with(default_branch) |
| 19 | + expect(Fastlane::Helper::GitHelper).to receive(:create_branch).with("release/#{next_version_short}", from: default_branch) |
36 | 20 |
|
37 | | - expect(Fastlane::Helper::Ios::VersionHelper).not_to receive(:update_fastlane_deliver) |
38 | | - expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver) |
| 21 | + expect(Fastlane::Helper::Ios::VersionHelper).to receive(:update_xc_configs).with(next_version, next_version_short, nil) |
| 22 | + expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump) |
39 | 23 |
|
40 | 24 | run_described_fastlane_action( |
41 | | - skip_deliver: skip_deliver, |
42 | 25 | default_branch: default_branch |
43 | 26 | ) |
44 | 27 | end |
|
0 commit comments