Sha256: 048e6d47e73ac6bf04e1b6db6b2da9a30ef2c0324b28390fe616ba825eb8bd08
Contents?: true
Size: 432 Bytes
Versions: 1
Compression:
Stored size: 432 Bytes
Contents
require 'tempfile' require 'fileutils' module Helpers def wordlist_tempfile(existing_file=nil) path = Tempfile.new('wordlist').path FileUtils.cp(existing_file,path) if existing_file return path end def should_contain_words(path,expected) words = [] File.open(path) do |file| file.each_line do |line| words << line.chomp end end words.sort.should == expected.sort end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wordlist-0.1.1 | spec/helpers/wordlist.rb |