Sha256: eb26392123083bcecc3c5782cb69e40b4e584dde42ff44c4315c760e66fea14b
Contents?: true
Size: 553 Bytes
Versions: 18
Compression:
Stored size: 553 Bytes
Contents
require 'spec_helper' module BugReport600 describe "stubbing a class method" do class ExampleClass def self.method_that_uses_define_method define_method "defined_method" do |attributes| load_address(address, attributes) end end end it "should work" do ExampleClass.should_receive(:define_method).with("defined_method") ExampleClass.method_that_uses_define_method end it "should restore the original method" do ExampleClass.method_that_uses_define_method end end end
Version data entries
18 entries across 18 versions & 1 rubygems