This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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")(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
su ec2-user | |
sudo yum -y update | |
sudo yum install -y git redhat-rpm-config sqlite-devel | |
# Install RVM and Ruby | |
# KEY1 and KEY1 grab from: https://rvm.io/ | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys KEY1 KEY2 | |
curl -sSL https://get.rvm.io | bash -s stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# flunk.rb | |
require "test/unit/assertions" | |
include Test::Unit::Assertions | |
flunk "throw a failure message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hello | |
def self.world | |
'world2' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test/unit/assertions" | |
include Test::Unit::Assertions | |
x = true | |
assert x, "x should pass" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer