Skip to content

Instantly share code, notes, and snippets.

FactoryGirl.define do
factory :passage do
author "test"
content "a ab abc abcd a ab abc abcd xyz zyx yxz yzx xyz bacd bacd"
language "h"
title "testFG"
end
end
@unobliged
unobliged / phs
Created June 14, 2012 19:50
passages helper spec
require 'spec_helper'
describe PassagesHelper do
describe "#unique_words" do
let(:passage) { FactoryGirl.create(:passage) }
passage.title.should eq("testFG")
# @result = unique_words(:passage.content)
# result.to_set == result
end
@unobliged
unobliged / lookup
Created May 23, 2012 18:14
plymlet old dictionary script
if __FILE__ == $0
# TODO Generated stub
end
$KCODE = "U"
filename = 'njs test.U8.TXT'
dictionary = 'cedict_ts.u8'
vocab_list = []