Skip to content

Instantly share code, notes, and snippets.

On holidays, not checking notifications

Brendan Forster shiftkey

On holidays, not checking notifications
View GitHub Profile
View clean-merged-branches.ps1
$dontcare = git fetch origin --prune
$branches = git branch -a --merged |
?{$_ -match "remotes\/origin"} |
?{$_ -notmatch "\/master"} |
%{$_.Replace("remotes/origin/", "").Trim() }
if (-not $branches) {
echo "No merged branches detected"
exit 0
shiftkey / test.cs
Created Oct 13, 2011 — forked from anonymous/test.cs
Good test/ bad test?
View test.cs
public void GetContextId_OnSecondRun_ReturnsStoredContextId() // "should" is a grey phrase
const string firstId = "200"; // context is used a lot in the test - removed here
const string secondId = "400"; // and i isolate these from my arrange for readability
// arrange
var record = new ContextRecord();
fakeRecordGenerator.Generate().Returns(record); // overuse of "Record" in here? necessary?
You can’t perform that action at this time.