Sha256: 67676d1cd5c2d0b6b669ae62bd7feeac4aeed195bf8bf78a5fd0c0458c9596c8
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
describe Econfig::Shortcut do let(:mod) { Module.new } before { mod.extend Econfig::Shortcut } describe "#method_missing" do it "proxies getters to the Econfig instance" do Econfig.instance.should_receive(:get).with("foobar").and_return("elephant") mod.foobar.should == "elephant" end it "proxies bang methods to the Econfig instance" do Econfig.instance.should_receive(:get!).with("foobar").and_return("elephant") mod.foobar!.should == "elephant" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
econfig-0.1.1 | spec/shortcut_spec.rb |
econfig-0.1.0 | spec/shortcut_spec.rb |