<commit_before>require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Spec
module Mocks
context "PartialMock" do
    setup do
        @object = Object.new
      
    end
    specify "should not receive  should mock out the method" do
        @object.should_not_receive(:fuhbar)
        @object.fuhbar
        lambda do
          @object.__verify
        end.should_raise(Spec::Mocks::MockExpectationError)
      
    end
    specify "should not receive  should return a negative message expectation" do
        @object.should_not_receive(:foobar).should_be_kind_of(NegativeMessageExpectation)
      
    end
    specify "should receive  should mock out the method" do
        @object.should_receive(:foobar).with(:test_param).and_return(1)
        @object.foobar(:test_param).should_equal(1)
      
    end
    specify "should receive  should return a message expectation" do
        @object.should_receive(:foobar).should_be_kind_of(MessageExpectation)
      @object.foobar
    end
    specify "should receive  should verify method was called" do
        @object.should_receive(:foobar).with(:test_param).and_return(1)
        lambda do
          @object.__verify
        end.should_raise(Spec::Mocks::MockExpectationError)
      
    end
  
end
end
end<commit_msg>format spec file<commit_after>require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Spec
  module Mocks
    context "using a Partial Mock," do
      setup do
        @object = Object.new
      end
      
      specify "should_not_receive should mock out the method" do
        @object.should_not_receive(:fuhbar)
        @object.fuhbar
        lambda do
          @object.__verify
        end.should_raise(Spec::Mocks::MockExpectationError)
      end

      specify "should_not_receive should return a negative message expectation" do
        @object.should_not_receive(:foobar).should_be_kind_of(NegativeMessageExpectation)
      end

      specify "should_receive should mock out the method" do
        @object.should_receive(:foobar).with(:test_param).and_return(1)
        @object.foobar(:test_param).should_equal(1)
      end

      specify "should_receive should return a message expectation" do
        @object.should_receive(:foobar).should_be_kind_of(MessageExpectation)
        @object.foobar
      end

      specify "should_receive should verify method was called" do
        @object.should_receive(:foobar).with(:test_param).and_return(1)
        lambda do
          @object.__verify
        end.should_raise(Spec::Mocks::MockExpectationError)
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.08359253499222395, 'fraction_numerical': 0.0023328149300155523, 'mean_word_length': 2.8517964071856285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5920081', 'n_tokens_mistral': 761, 'n_tokens_neox': 736, 'n_words': 171}