Sha256: eb1b33f96c8ec25d8a622f4f2911f88dddb7f8fb2c0093053658429e9a5cdfe8
Contents?: true
Size: 797 Bytes
Versions: 18
Compression:
Stored size: 797 Bytes
Contents
require "spec_helper" describe Ruboty::Robot do let(:instance) do described_class.new(options) end let(:options) do {} end describe "#brain" do context "without any Brain class" do it "returns a Ruboty::Brains::Memory" do instance.brain.should be_a Ruboty::Brains::Memory end it "can be used as a Hash object" do instance.brain.data["a"] = 1 instance.brain.data["a"].should == 1 end end context "with another Brain class" do after do Ruboty::Brains::Base.brain_classes.pop end let!(:another_brain_class) do Class.new(Ruboty::Brains::Base) end it "returns its instance as a Brain" do instance.brain.should be_a another_brain_class end end end end
Version data entries
18 entries across 18 versions & 1 rubygems