Skip to content

Instantly share code, notes, and snippets.

View omenking's full-sized avatar
🏠
Working from home

Andrew Brown omenking

🏠
Working from home
View GitHub Profile
const request = require("supertest");
const { Tag } = require("../../models/tag");
const { Track } = require("../../models/track");
let server;
describe("/api/tracks", () => {
beforeEach(() => {
// Run the express server
server = require("../../index");
@omenking
omenking / index.js
Created August 24, 2018 19:06 — forked from sharad-s/index.js
// Direct Imports
const express = require("express");
const winston = require("winston");
// Instantiate express
const app = express();
require("./startup/logging")();
require("./startup/middleware")(app);
// require("./startup/config")();
@omenking
omenking / tags.test.js
Last active August 24, 2018 19:09 — forked from sharad-s/tags.test.js
const request = require("supertest");
const { Tag } = require("../../models/tag");
const Server = require("../../index");
let server;
describe("/api/tags", () => {
afterEach(async () => {
@omenking
omenking / flunk.rb
Created June 13, 2019 02:31
000 - QA Mastery
# flunk.rb
require "test/unit/assertions"
include Test::Unit::Assertions
flunk "throw a failure message"
@omenking
omenking / hello.rb
Created June 13, 2019 02:34
000 - QA Mastery
class Hello
def self.world
'world2'
end
end
@omenking
omenking / hello_test.rb
Created June 13, 2019 02:34
001 - QA Mastery
require "test/unit"
require_relative './hello'
class HelloTest < Test::Unit::TestCase
def test_world
assert_equal 'world', Hello.world, "Hello.world should return a string called 'world'"
end
def test_flunk
flunk "You shall not pass"
@omenking
omenking / simple.rb
Created June 13, 2019 02:38
001 - QA Mastery
require "test/unit/assertions"
include Test::Unit::Assertions
x = true
assert x, "x should pass"
@omenking
omenking / hello_test.rb
Created June 13, 2019 02:57
002 - QA Mastery
require 'minitest/autorun'
require_relative './hello'
class HelloTest < Minitest::Test
def test_world
assert_equal 'world', Hello.world, "Hello.world should return a string called 'world'"
end
def test_flunk
flunk "You shall not pass"
@omenking
omenking / hello_spec.rb
Created June 13, 2019 02:58
002 - QA Mastery
require 'minitest/autorun'
require_relative './hello'
describe Hello do
describe "#world" do
it "should return world" do
Hello.world.must_equal 'world'
end
end
end
@omenking
omenking / Gemfile
Created June 13, 2019 02:59
002 - QA Mastery
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'minitest'