#! /usr/bin/env ruby $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require "querinator" @path = "./spec/test_question_file.txt" def runit questions = Querinator::Importer.new.parse(@path) random_question = questions.sample puts random_question.pose input = gets() input = input.chomp if random_question.is_correct?(input) puts "Hooray!!" else puts "oooooh." puts "The correct answer was '#{random_question.answer}'" end end runit