Sha256: ac724a365c247440d39a84333376a0d82c750e55d29f4b71103a0cdc76686e4d
Contents?: true
Size: 542 Bytes
Versions: 11
Compression:
Stored size: 542 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
11 entries across 11 versions & 6 rubygems