Skip to content

Instantly share code, notes, and snippets.

View DeathRay1977's full-sized avatar

Norm Fasey DeathRay1977

  • Sky TV
  • Worthing, West Sussex
View GitHub Profile
--langdef=BrightScript
--langmap=BrightScript:.brs.bs
--regex-BrightScript=/^[Ff]unction[ \t]*([a-zA-Z0-9_]+)/\1/f,function/
--regex-BrightScript=/^[ \t]*[a-zA-Z0-9_]+[.]([a-zA-Z0-9_]+)[ \t]*=[ \t]*[Ff]unction/\1/f,function/
--regex-BrightScript=/^[Ss]ub[ \t]*([a-zA-Z0-9_]+)/\1/s,sub/
--regex-BrightScript=/^[ \t]*([a-zA-Z0-9_]+) ?=/\1/v,variable/
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
tests = Test.create([{ description: "Feb 2016 Cohort", pass_score: 4 },
{ description: "Ronin Feb 2016", pass_score: 4 },
{ description: "Mar 2016 Cohort", pass_score: 5 },
require 'rails_helper'
feature 'restaurants' do
context 'no restaurants have been added' do
scenario 'should display a prompt to add a restaurant' do
visit '/restaurants'
expect(page).to have_content 'No restaurants yet'
expect(page).to have_link 'Add a restaurant'
end
end
(ns anagram
(:require [clojure.string :refer [lower-case upper-case]]))
(defn- canonicalize
[word]
(-> word
lower-case
frequencies))
(defn- uppercase?