Sha256: 6b510d299909ee270c0fc4b1fb8d324038b4fd56778eb6eba12be6d03a1b5113
Contents?: true
Size: 541 Bytes
Versions: 186
Compression:
Stored size: 541 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 "works" do ExampleClass.should_receive(:define_method).with("defined_method") ExampleClass.method_that_uses_define_method end it "restores the original method" do ExampleClass.method_that_uses_define_method end end end
Version data entries
186 entries across 132 versions & 17 rubygems