A fork of Crisp for HARP
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 

22 rindas
558 B

require "../helper"
describe "Crisp::Interpreter" do
describe "#eval_string" do
it "evaluates string of Crisp expression" do
i = Crisp::Interpreter.new
result = i.eval_string "(+ 1 2)"
result.should be_a(Crisp::Type)
unwrapped = result.unwrap
unwrapped.should be_a(Int32)
unwrapped.should eq(3)
end
end
describe "#run" do
it "raises eval error with file which doesn't exist" do
expect_raises Crisp::EvalException do
Crisp::Interpreter.new "/non/existent/file"
end
end
end
end