search for: mock_spec

Displaying 3 results from an estimated 3 matches for "mock_spec".

Did you mean: book_spec
2010 Jul 13
2
[Rspec] Difference between stub and message expectation with any_number_of_times
I''m wondering what''s the difference between stub and message expectation with any_number_of_times, for example: myMock = mock("mymock") myMock.stub!(:is_a?).with(MyClass).and_return(false) and myMock = mock("mymock") myMock.should_receive(:is_a?).with(MyClass).any_number_of_times.and_return(false) because is_a? may not be called at all, it just like a
2008 Mar 05
7
mocking successive return values
..._string with (no args) 4 times, but received it once I verified "and_return" is actually returning the array rather than an individual element of the existing_quote_numbers array which makes sense, but what about this? http://rspec.rubyforge.org/svn/branches/dogfood/spec/spec/mocks/mock_spec.rb specify "should use a list of return values for successive calls" do @mock.should_receive(:multi_call).twice.with(:no_args).and_return([8, 12]) @mock.multi_call.should_equal 8 @mock.multi_call.should_equal 12 @mock.__verify end Any feedback on...
2007 Jul 26
5
Coding standards and whitespace
.../spec/mocks/bug_report_11545_spec.rb rspec/spec/spec/mocks/bug_report_7611_spec.rb rspec/spec/spec/mocks/bug_report_8302_spec.rb rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb rspec/spec/spec/mocks/mock_ordering_spec.rb rspec/spec/spec/mocks/mock_space_spec.rb rspec/spec/spec/mocks/mock_spec.rb rspec/spec/spec/mocks/multiple_return_value_spec.rb rspec/spec/spec/mocks/once_counts_spec.rb rspec/spec/spec/mocks/partial_mock_spec.rb rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb rspec/spec/spec/mocks/stub_spec...