Sha256: e75971eeb5d832bc3e4a0add927051e31865311ac61410a806881fc99581bffb
Contents?: true
Size: 539 Bytes
Versions: 41
Compression:
Stored size: 539 Bytes
Contents
require 'spec_helper' module BugReport600 class ExampleClass def self.method_that_uses_define_method define_method "defined_method" do |attributes| load_address(address, attributes) end end end describe "stubbing a class method" do 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
41 entries across 41 versions & 12 rubygems