From 1d4decbc8567f4cab2f3b8ac9a1d60f8e28b9b4c Mon Sep 17 00:00:00 2001 From: Amndeep Singh Mann Date: Mon, 23 Dec 2024 16:39:20 -0500 Subject: [PATCH] meet will's request for eq over match Signed-off-by: Amndeep Singh Mann --- src/courses/advanced/05.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/courses/advanced/05.md b/src/courses/advanced/05.md index 0a7a0541f..355081479 100644 --- a/src/courses/advanced/05.md +++ b/src/courses/advanced/05.md @@ -86,7 +86,7 @@ end # What is the current branch describe command("git --git-dir #{git_dir} branch --show-current").stdout.strip do - it { should match 'main' } + it { should eq 'main' } end # What is the latest commit @@ -125,7 +125,7 @@ Target ID: 6dcb9e6f-5ede-5474-9521-595fadf5c7ce ["main", "testBranch"] ✔ is expected to include "testBranch" main - ✔ is expected to match "main" + ✔ is expected to eq "main" Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log -1 --pretty=format:'%h'` ✔ stdout is expected to match /7a748c6/ Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log --skip=1 -1 --pretty=format:'%h'` @@ -276,7 +276,7 @@ Target ID: 6dcb9e6f-5ede-5474-9521-595fadf5c7ce ["main", "testBranch"] ✔ is expected to include "testBranch" main - ✔ is expected to match "main" + ✔ is expected to eq "main" Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log -1 --pretty=format:'%h'` ✔ stdout is expected to match /7a748c6/ Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log --skip=1 -1 --pretty=format:'%h'` @@ -330,7 +330,7 @@ Target ID: 6dcb9e6f-5ede-5474-9521-595fadf5c7ce ["main", "testBranch"] ✔ is expected to include "testBranch" main - ✔ is expected to match "main" + ✔ is expected to eq "main" Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log -1 --pretty=format:'%h'` ✔ stdout is expected to match /7a748c6/ Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log --skip=1 -1 --pretty=format:'%h'` @@ -371,7 +371,7 @@ Now let's adjust our test to also check for our second branch that we created ea describe git(git_dir) do its('branches') { should include 'main' } its('branches') { should include 'testBranch' } - its('current_branch') { should cmp 'main' } + its('current_branch') { should eq 'main' } end ``` @@ -473,7 +473,7 @@ Target ID: 6dcb9e6f-5ede-5474-9521-595fadf5c7ce git ✔ branches is expected to include "main" ✔ branches is expected to include "testBranch" - ✔ current_branch is expected to cmp == "main" + ✔ current_branch is expected to eq "main" Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log -1 --pretty=format:'%h'` ✔ stdout is expected to match /7a748c6/ Command: `git --git-dir /workspaces/saf-training-lab-environment/git_test_target/.git log --skip=1 -1 --pretty=format:'%h'`