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
# 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 }, |
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 '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 |
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
(ns anagram | |
(:require [clojure.string :refer [lower-case upper-case]])) | |
(defn- canonicalize | |
[word] | |
(-> word | |
lower-case | |
frequencies)) | |
(defn- uppercase? |