Sha256: 63e372853ec758cd8b0b5a62531c72fca1d06c8a9b035bdf6d8da31c93eac971
Contents?: true
Size: 553 Bytes
Versions: 12
Compression:
Stored size: 553 Bytes
Contents
require 'spec_helper' module Spec module Mocks describe "stubbing a base class class method" do before do @base_class = Class.new @concrete_class = Class.new(@base_class) @base_class.stub!(:find).and_return "stubbed_value" end it "should return the value for the stub on the base class" do @base_class.find.should == "stubbed_value" end it "should return the value for the descendent class" do @concrete_class.find.should == "stubbed_value" end end end end
Version data entries
12 entries across 12 versions & 4 rubygems