Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Mark Bradley braddle

🎯
Focusing
Block or report user

Report or block braddle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@braddle
braddle / ginkgo-file.go
Created Jul 24, 2019
Golang Ginkgo setup test file live template
View ginkgo-file.go
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("$SPEC$", func() {
})
@braddle
braddle / multiply.go
Created Jul 17, 2019
Very simple example of testing with GoMock and Concurrency
View multiply.go
package math
type Table struct {
Base int
Result int
}
type Random interface {
GenerateInt() int
}
@braddle
braddle / testify_suite_setup.txt
Created Jun 11, 2019
Golang Testify Suite SetUp Live Template
View testify_suite_setup.txt
func (s *$SUITE$Suite) SetupTest() {
$END$
}
@braddle
braddle / testify_suite_test.txt
Created Jun 11, 2019
Golang Testify Suite Test Live Template
View testify_suite_test.txt
func (s *$SUITE$) Test$NAME$() {
$END$
}
@braddle
braddle / testify_suite.txt
Created Jun 11, 2019
Golang Testify Suite Live Template
View testify_suite.txt
type $SUITE$Suite struct {
suite.Suite
}
func Test$SUITE$Suite(t *testing.T) {
suite.Run(t, new($SUITE$Suite))
}
@braddle
braddle / tdd_talk.md
Last active Jan 16, 2019
Test Driven Development: Dipping your toe into tests first
View tdd_talk.md

Writing tests before you write production code can be an intimidating concept, but there is no need to be scared.

During this talk we will look at the concept of Test Driven Development (TDD) and what it takes to write tests first.

We will look at:

  • What is TDD?
  • Why should you use TDD?
  • How to use TDD

The talk will finish with a Mob Programming session where attendees can join in on ‘TDD-ing’ a simple piece of code.

@braddle
braddle / till_opening.feature
Created Nov 15, 2018
Till Opening Feature (For TTD Modding Session)
View till_opening.feature
Feature:
As a Store Manager
I want customer to be unable to pay until the tills are open
So that I comply with trading laws
Rules:
- Checkout is not available until the time of till opening
Background:
Given store "Cayman Island Supermarket"
@braddle
braddle / store_closing.feature
Created Nov 15, 2018
Store Closing Feature (For TTD Modding Session)
View store_closing.feature
Feature:
As A Store Manager
I Want customers to only be unable to use SmartShop 30 minutes before the store closes
So That my staff don't have to work late waiting for people to finish
Rules:
- Shops cannot be started 30 minutes before the store closes
Background:
Given store "Cayman Island Supermarket"
@braddle
braddle / store_opening.feature
Last active Nov 15, 2018
Store Opening Feature (For TTD Modding Session)
View store_opening.feature
Feature:
As A Store Manager
I Want customers to only be able to use SmartShop after my shop is open
So That my sales data matches into works
Rules:
- Shops cannot be started until the store opening time
Background:
Given store "Cayman Island Supermarket"
@braddle
braddle / tdd_intro.md
Last active Nov 7, 2018
Workshop Abstract: Introduction to TDD
View tdd_intro.md

Want to ship code faster? Want to work on features over bugs? Want more confidence in your code?

You need to TEST ALL THE THINGS!

Writing tests before you write production code can be an intimidating concept, but there is no need for it to be.

During this hands on workshop we will introduce the concepts of Test Driven Development then backs them up with group and individual practical sessions.

The workshop will cover:

  • What is TDD
You can’t perform that action at this time.