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 "simplecov" | |
SimpleCov.start "rails" | |
require "yaml" | |
require "active_record" | |
require "factory_girl_rails" | |
require "shoulda-matchers" | |
require 'money-rails' | |
connection_info = YAML.load_file("config/database.yml")["test"] |
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
function Anagram(word) { | |
this.word = word; | |
} | |
Anagram.prototype.match = function(words) { | |
return words.filter(function(word) { | |
return areAnagrams(this.word, word); | |
}, this); | |
}; |
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
var DNA_NUCLEOTIDES = ['A', 'T', 'C', 'G']; | |
var ALL_NUCLEOTIDES = DNA_NUCLEOTIDES.concat('U'); | |
function initialCounts() { | |
return DNA_NUCLEOTIDES.reduce(function(counts, nucleotide) { | |
counts[nucleotide] = 0; | |
return counts; | |
}, {}); | |
} |