Sha256: 889b8e8e46fb6c7db7262aa8bc3fb0862b794a2a29a6e10f1111a51879299a88
Contents?: true
Size: 803 Bytes
Versions: 2
Compression:
Stored size: 803 Bytes
Contents
require "spec_helper" require "mabbre/patch/object_mixin/respond_to_missing" describe MAbbre::Patch::ObjectMixin do subject do dc = described_class Class.new.instance_eval { include dc }.new end describe "#respond_to?" do it "calls #respond_to_missing? at least once" do expect(subject).to receive(:respond_to_missing?).with(:test_method, false).at_least(:once) subject.respond_to? :test_method end it "calls #respond_to_missing? at most twice" do expect(subject).to receive(:respond_to_missing?).with(:test_method, false).at_most(:twice) subject.respond_to? :test_method end end describe "#respond_to_missing?" do it "returns false" do expect(subject.send(:respond_to_missing?, :test_method, true)).to be(false) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mabbre-0.0.3 | spec/lib/mabbre/patch/object_mixin/respond_to_missing_spec.rb |
mabbre-0.0.2 | spec/lib/mabbre/patch/object_mixin/respond_to_missing_spec.rb |