Skip to content

Instantly share code, notes, and snippets.

View mattwynne's full-sized avatar

Matt Wynne mattwynne

View GitHub Profile
@mattwynne
mattwynne / matt-wynne-headshot.jpg
Last active August 3, 2022 04:25
A profile for Matt to use for conferences etc.
matt-wynne-headshot.jpg
@mattwynne
mattwynne / be_same_file_as.rb
Last active May 21, 2022 13:27
RSpec matcher to compare two file, using their MD5 hashes
RSpec::Matchers.define(:be_same_file_as) do |exected_file_path|
match do |actual_file_path|
expect(md5_hash(actual_file_path)).to eq(md5_hash(expected_file_path))
end
def md5_hash(file_path)
Digest::MD5.hexdigest(File.read(file_path))
end
end
  • I don't have a specific topic, I would love to get to know "what people are talking about"...
  • Expressing examples in Markdown and How lean/agile teams should prioritise work for maximum impact.
  • Cucumber for mobile app testing
  • Learning: Organising feature files as a living documentation for a whole system in an microservice architecture where feature files ""live"" in the corresponding microservices.
  • The state of Cucumber messaging and reporting as a whole
  • Patterns and anti-patterns in Cucumber.
  • Bdd and Java
  • integration with another report tools
  • Cucumber / Behat
  • ethical software development, narratives,
@mattwynne
mattwynne / gist:1228927
Created September 20, 2011 11:52
eventually helper method for making assertions against asynchronous systems
# usage:
# it "should return a result of 5" do
# eventually { long_running_thing.result.should eq(5) }
# end
module AsyncHelper
def eventually(:options = {})
timeout = options[:timeout] || 2
interval = options[:interval] || 0.1
time_limit = Time.now + timeout
loop do
### Keybase proof
I hereby claim:
* I am mattwynne on github.
* I am mattwynne (https://keybase.io/mattwynne) on keybase.
* I have a public key ASCCJyYpFMQWfVzK1MWiDMnDCjkw2Bvv_jW6H1mpgRXN4Ao
To claim this, I am signing this object:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running Cukes
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.874 s <<< FAILURE! - in Cukes
[ERROR] Eat some cukes Time elapsed: 0.855 s <<< ERROR!
java.lang.IllegalStateException: No valid CDI implementation found
[ERROR] Eat some more cukes Time elapsed: 0.009 s <<< ERROR!
java.lang.IllegalStateException: No valid CDI implementation found
Commit = Struct.new(:repo, :sha, :comment, :stats) do
def refactoring?(previous_commit)
return :spec_files_unchanged if no_changes_to_specs
return :comment if refactoring_comment
return false if result.nil? || result.failed > 0 || result.total == 0
return :spec_results_unchanged if result == previous_commit.result
return false
end
def no_changes_to_specs
@mattwynne
mattwynne / bull-test.js
Created April 22, 2020 17:26
Puzzled about how whenCurrentJobsFinished is supposed to work
const Queue = require('bull')
const q = new Queue('test')
const main = async () => {
await q.clean(0, 'completed')
q.process(async job => {
console.log('work starting')
await new Promise(resolve => setTimeout(resolve, 3000))
console.log('work done')
})
@mattwynne
mattwynne / index.ts
Created March 25, 2020 09:41
ten second pause at end of typeorm script... why?
import "reflect-metadata";
import {createConnection} from "typeorm";
import {User} from "./entity/User";
process.on('exit', () => {
console.log('exit: ', new Date())
})
createConnection().then(async connection => {
@mattwynne
mattwynne / worksheeet.md
Last active March 13, 2020 12:00
Pi Club HTML Worksheet 1

Welcome back to Pi Club!

Link to your website: http://localhost

Worksheet 2

Adding some style

Open your HTML code in your editor. It's in /var/www/html/index.html