Sha256: 10506ebf0461962420fabe316d2a992da4633c2a15d7b0bdeca271fada75a94e
Contents?: true
Size: 545 Bytes
Versions: 6
Compression:
Stored size: 545 Bytes
Contents
require 'spec_helper' describe CaptainHoog::Env do it "is inherits from Hash" do expect(subject.class).to be_subclass_of(Hash) end describe "treats keys as methods" do let(:env){ CaptainHoog::Env.new } before do env[:foo] = "bar" end it "raises not a NoMethodError" do expect { env.foo }.to_not raise_error end it "responds to the key as method" do expect(env).to respond_to(:foo) end it "returns the value for the key" do expect(env.foo).to eq "bar" end end end
Version data entries
6 entries across 6 versions & 1 rubygems