Sha256: aab4df056c13d0f28c51c3b9f14546b026e73a4c75629642e3dceaa934782a17
Contents?: true
Size: 988 Bytes
Versions: 9
Compression:
Stored size: 988 Bytes
Contents
require 'logirel/queries' module Logirel module Queries describe BoolQ, "when given input" do before(:each) { @out = StringIO.new } it "input says no, second time" do io = StringIO.new "x\nn" b = BoolQ.new "Yes or no?", true, io, @out b.exec.should be_false end it "input says yet, second time" do io = StringIO.new "x\ny" b = BoolQ.new "Yes or no?", false, io, @out b.exec.should be_true end it "input says yes" do io = StringIO.new "y" b = BoolQ.new "Yes or no?", false, io, @out b.exec.should be_true end it "input says no" do io = StringIO.new "n" b = BoolQ.new("Yes or no?", true, io, @out) b.exec.should be_false end it "input is default" do io = StringIO.new "\n" b = BoolQ.new("Yes or no?", true, io, @out) b.exec.should be_true end end end end
Version data entries
9 entries across 9 versions & 1 rubygems