Sha256: 445579c67a0d9f61e0e1c088252506aee574aaba71cb3b9712ffad47f76394dd
Contents?: true
Size: 984 Bytes
Versions: 5
Compression:
Stored size: 984 Bytes
Contents
Feature: Argument matchers Bogus supports some argument matchers for use, when you don't really care about exact equality of arguments passed in or spied on. Background: Given a file named "foo.rb" with: """ruby class Catalog def self.books_by_author_and_title(author, title) end end """ Scenario: Stubbing methods with any arguments Then the following test should pass: """ruby stub(Catalog).books_by_author_and_title(any_args) { :some_book } Catalog.books_by_author_and_title("Mark Twain", "Tom Sawyer").should == :some_book """ Scenario: Stubbing methods with some wildcard arguments Then the following test should pass: """ruby stub(Catalog).books_by_author_and_title("Mark Twain", anything) { :twains_book } Catalog.books_by_author_and_title("Mark Twain", "Tom Sawyer").should == :twains_book Catalog.books_by_author_and_title("Mark Twain", "Huckleberry Finn").should == :twains_book """
Version data entries
5 entries across 5 versions & 1 rubygems