Sha256: a4b49d7c3a2838454ce26df37ca082dc081d44a9a3ae6c85273419fca08923bc
Contents?: true
Size: 738 Bytes
Versions: 22
Compression:
Stored size: 738 Bytes
Contents
require 'spec_helper' require "shellplay/screen" describe Shellplay::Screen, "A typical screen element" do let(:goodhash) { { "timespent" => 0.123, "stdin" => "ls -1", "stdout" => "bin\nCHANGELOG.md\nGemfile\n" } } subject { Shellplay::Screen.new } describe ".import" do context "when we import a valid hash, " do before { subject.import(goodhash) } it "fills up instance variables from a hash" do expect(subject.stdin).to eq goodhash['stdin'] end end context "when we import an empty hash, " do before { subject.import({}) } it "inits the variables with false values" do expect(subject.stdin).to be_falsey end end end end
Version data entries
22 entries across 22 versions & 1 rubygems