agiledox.txt

Path: agiledox.txt
Last Update: Tue Jun 24 18:05:20 +0100 2008

bug_18914 should:

 - not allow stubbing of non mock instance disrupted by legitimate overriding of eql method

expected_invocation_count should:

 - fail if method is expected at least once but is never called
 - fail if method is expected at most once but is called twice
 - fail if method is expected between two and four times and is called five times
 - fail if method is expected between two and four times and is called once
 - fail if method is expected twice but is called once
 - fail if method is expected twice but is called three times
 - fail if method is never expected but is called once
 - fail if method is never expected but is called once even if everything is stubbed
 - fail if there is no matching expectation
 - pass if method is expected at least once and is called once
 - pass if method is expected at least once and is called twice
 - pass if method is expected at most once and called once
 - pass if method is expected at most once and is never called
 - pass if method is expected between two and four times and is called four times
 - pass if method is expected between two and four times and is called three times
 - pass if method is expected between two and four times and is called twice
 - pass if method is expected twice and is called twice
 - pass if method is never expected and is never called
 - pass if method is never expected and is never called even if everything is stubbed

failure_messages should:

 - display class name and address when expectation was on instance
 - display class name and any instance prefix when expectation was on any instance
 - display class name when expectation was on class
 - display mock address when expectation was on unnamed mock
 - display mock name when expectation was on named mock
 - display string when expectation was on string

mocha_example should:

 - step both tracks backward ten steps
 - step both tracks forward ten steps
 - step left track backwards five steps and right track forwards five steps
 - step left track forwards five steps and right track backwards five steps

mocha_test_result should:

 - display backtrace indicating line number where failing assertion was called
 - display backtrace indicating line number where unexpected method was called
 - include assertion failure in failure count
 - include assertions in assertion count
 - include expectation verification failure in failure count
 - include expectation verification in assertion count
 - include unexpected verification failure in failure count
 - not include stubbing expectation verification in assertion count

mock should:

 - build mock and explicitly add an expectation which is not satisfied
 - build mock and explicitly add an expectation which is satisfied
 - build mock incorporating two expectations the first of which is not satisifed
 - build mock incorporating two expectations the second of which is not satisifed
 - build mock incorporating two expectations which are satisifed
 - build named mock and explicitly add an expectation which is not satisfied
 - build named mock and explicitly add an expectation which is satisfied
 - build named mock incorporating two expectations the first of which is not satisifed
 - build named mock incorporating two expectations the second of which is not satisifed
 - build named mock incorporating two expectations which are satisifed

mock_with_initializer_block should:

 - expect two method invocations and receive both of them
 - expect two method invocations but receive only one of them
 - stub methods

mocked_methods_dispatch should:

 - find later expectation until it stops matching then find earlier stub
 - find latest expectation which has not stopped matching
 - find latest expectation with range of expected invocation count which has not stopped matching
 - find latest matching expectation
 - keep finding later stub and so never satisfy earlier expectation

optional_parameters should:

 - fail if all required and optional parameters match but too many optional parameters are supplied
 - fail if all required parameters match but no optional parameters match
 - fail if all required parameters match but some optional parameters do not match
 - pass if all required and optional parameters match and all optional parameters are supplied
 - pass if all required and optional parameters match and some optional parameters are supplied
 - pass if all required parameters match and no optional parameters are supplied

parameter_matcher should:

 - match hash parameter with specified entries
 - match hash parameter with specified entries using nested matchers
 - match hash parameter with specified hash entry
 - match hash parameter with specified key
 - match hash parameter with specified key value pair
 - match hash parameter with specified value
 - match parameter that matches all values
 - match parameter that matches any value
 - match parameter that matches regular expression
 - not match hash parameter with specified entries
 - not match hash parameter with specified entries using nested matchers
 - not match hash parameter with specified hash entry
 - not match hash parameter with specified key
 - not match hash parameter with specified key value pair
 - not match hash parameter with specified value
 - not match parameter that does not match all values
 - not match parameter that does not match any value
 - not match parameter that does not match regular expression

partial_mocks should:

 - fail if all expectations are not satisfied
 - pass if all expectations are satisfied

return_value should:

 - build mock and explicitly add an expectation with a return value
 - build mock incorporating two expectations with return values
 - build stub and explicitly add an expectation with a return value
 - build stub incorporating two expectations with return values

sequence should:

 - allow expectations to be in more than one sequence
 - allow invocations in sequence
 - allow invocations in sequence even if expected on different mocks
 - allow invocations in sequence even if expected on partial mocks
 - allow stub expectations to be skipped in sequence
 - constrain invocations to occur in expected order
 - constrain invocations to occur in expected order even if expected on different mocks
 - constrain invocations to occur in expected order even if expected on partial mocks
 - have shortcut for expectations to be in more than one sequence
 - include sequence in failure message
 - regard sequences as independent of each other

standalone should:

 - fail mocha test due to unexpected invocation
 - fail mocha test due to unfulfilled exception
 - fail mocha test with non matching parameter
 - fail stubba test
 - pass mocha test
 - pass mocha test with matching parameter
 - pass stubba test

states should:

 - allow expectations to occur in correct state
 - be able to start in a specific state
 - constrain expectations to occur within a given state
 - switch state when method raises an exception

stub_any_instance_method should:

 - be able to stub a superclass method
 - be able to stub method if ruby18 private instance methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby18 protected instance methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby18 public instance methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 private instance methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 protected instance methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 public instance methods include method but method does not actually exist like active record association proxy
 - leave stubbed private method unchanged after test
 - leave stubbed protected method unchanged after test
 - leave stubbed public method unchanged after test
 - reset expectations after test
 - stub method within test

stub_class_method should:

 - be able to stub a superclass method
 - be able to stub method if ruby18 private methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby18 protected methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby18 public methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 private methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 protected methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 public methods include method but method does not actually exist like active record association proxy
 - leave stubbed private method unchanged after test
 - leave stubbed protected method unchanged after test
 - leave stubbed public method unchanged after test
 - reset class expectations after test
 - stub method within test

stub_everything should:

 - build named stub and explicitly add an expectation
 - build named stub incorporating two expectations
 - build stub and explicitly add an expectation
 - build stub incorporating two expectations

stub_instance_method should:

 - be able to stub a superclass method
 - be able to stub method if ruby18 private methods include method but method does not exist like active record association proxy
 - be able to stub method if ruby18 protected methods include method but method does not exist like active record association proxy
 - be able to stub method if ruby18 public methods include method but method does not exist like active record association proxy
 - be able to stub method if ruby19 private methods include method but method does not exist like active record association proxy
 - be able to stub method if ruby19 protected methods include method but method does not exist like active record association proxy
 - be able to stub method if ruby19 public methods include method but method does not exist like active record association proxy
 - leave stubbed private method unchanged after test
 - leave stubbed protected method unchanged after test
 - leave stubbed public method unchanged after test
 - reset expectations after test

stub_module_method should:

 - be able to stub a superclass method
 - be able to stub method if ruby18 private methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby18 public methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 private methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 protected methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby19 public methods include method but method does not actually exist like active record association proxy
 - be able to stub method if ruby 18 protected methods include method but method does not actually exist like active record association proxy
 - leave stubbed private method unchanged after test
 - leave stubbed protected method unchanged after test
 - leave stubbed public method unchanged after test
 - reset expectations after test
 - stub method within test

stub should:

 - build named stub and explicitly add an expectation
 - build named stub incorporating two expectations
 - build stub and explicitly add an expectation
 - build stub incorporating two expectations

stubba_example should:

 - stub class method
 - stub class method again
 - stub instance method
 - stub instance method on any instance of a class
 - stub instance method on any instance of a class again
 - stub module method
 - stub module method again
 - stub two different class methods
 - stub two different class methods again

stubba_test_result should:

 - display backtrace indicating line number where failing assertion was called
 - include assertion failure in failure count
 - include assertions in assertion count
 - include expectation verification failure in failure count
 - include expectation verification in assertion count
 - not include stubbing expectation verification in assertion count

stubbing_error_backtrace should:

 - display backtrace indicating line number where attempt to stub method on non mock object was made
 - display backtrace indicating line number where attempt to stub non existent method was made
 - display backtrace indicating line number where attempt to stub non public method was made
 - display backtrace indicating line number where method was unnecessarily stubbed

stubbing_method_unnecessarily should:

 - allow stubbing method unnecessarily
 - allow stubbing method when stubbed method is invoked
 - default to allow stubbing method unnecessarily
 - prevent stubbing method unnecessarily
 - warn when stubbing method unnecessarily

stubbing_non_existent_any_instance_method should:

 - allow stubbing existing private any instance method
 - allow stubbing existing private any instance superclass method
 - allow stubbing existing protected any instance method
 - allow stubbing existing protected any instance superclass method
 - allow stubbing existing public any instance method
 - allow stubbing existing public any instance superclass method
 - allow stubbing non existent any instance method
 - default to allow stubbing non existent any instance method
 - prevent stubbing non existent any instance method
 - warn when stubbing non existent any instance method

stubbing_non_existent_class_method should:

 - allow stubbing existing private class method
 - allow stubbing existing private superclass method
 - allow stubbing existing protected class method
 - allow stubbing existing protected superclass method
 - allow stubbing existing public class method
 - allow stubbing existing public superclass method
 - allow stubbing method to which class responds
 - allow stubbing non existent class method
 - default to allow stubbing non existent class method
 - prevent stubbing non existent class method
 - warn when stubbing non existent class method

stubbing_non_existent_instance_method should:

 - allow stubbing existing private instance method
 - allow stubbing existing private instance superclass method
 - allow stubbing existing protected instance method
 - allow stubbing existing protected instance superclass method
 - allow stubbing existing public instance method
 - allow stubbing existing public instance superclass method
 - allow stubbing method to which instance responds
 - allow stubbing non existent instance method
 - default to allow stubbing non existent instance method
 - prevent stubbing non existent instance method
 - warn when stubbing non existent instance method

stubbing_non_public_any_instance_method should:

 - allow stubbing private any instance method
 - allow stubbing protected any instance method
 - allow stubbing public any instance method
 - default to allow stubbing private any instance method
 - default to allow stubbing protected any instance method
 - prevent stubbing private any instance method
 - prevent stubbing protected any instance method
 - warn when stubbing private any instance method
 - warn when stubbing protected any instance method

stubbing_non_public_class_method should:

 - allow stubbing method to which class responds
 - allow stubbing private class method
 - allow stubbing protected class method
 - allow stubbing public class method
 - default to allow stubbing private class method
 - default to allow stubbing protected class method
 - prevent stubbing private class method
 - prevent stubbing protected class method
 - warn when stubbing private class method
 - warn when stubbing protected class method

stubbing_non_public_instance_method should:

 - allow stubbing method to which instance responds
 - allow stubbing private instance method
 - allow stubbing protected instance method
 - allow stubbing public instance method
 - default to allow stubbing private instance method
 - default to allow stubbing protected instance method
 - prevent stubbing private instance method
 - prevent stubbing protected instance method
 - warn when stubbing private instance method
 - warn when stubbing protected instance method

stubbing_on_non_mock_object should:

 - allow stubbing method on mock object
 - allow stubbing method on non mock object
 - default to allow stubbing method on non mock object
 - prevent stubbing method on non mock object
 - warn on stubbing method on non mock object

any_instance_method should:

 - call remove new method
 - call reset mocha
 - call restore original method
 - define a new method
 - hide original method
 - not hide original method if it is not defined
 - not restore original method if hidden method not defined
 - restore original method
 - return any instance mocha for stubbee

array_inspect should:

 - use inspect
 - use mocha inspect on each item

backtrace_filter should:

 - determine path for mocha lib directory
 - exclude mocha locations from backtrace

cardinality should:

 - allow invocations if invocation count has not yet reached maximum
 - be satisfied if invocations so far have reached required threshold
 - describe cardinality
 - need verifying
 - not need verifying

central should:

 - not stub method if already stubbed
 - record method
 - start with empty stubba methods
 - stub method if not already stubbed
 - unstub all methods

change_state_side_effect should:

 - activate the given state
 - describe itself in terms of the activated state

class_method should:

 - be equal if other class method has same stubbee and same method but stubbee equal method lies like active record association proxy
 - be equal if other class method has same stubbee and same method so no attempt is made to stub a method twice
 - call define new method
 - call hide original method
 - call remove new method
 - call reset mocha
 - call restore original method
 - define a new method which should call mocha method missing
 - hide original method
 - not be equal if other class method has different method
 - not be equal if other class method has different stubbee
 - not be equal if other object has a different class
 - not hide original method if method not defined
 - not restore original method if hidden method is not defined
 - provide hidden version of method name ending with suffix
 - provide hidden version of method name including original method name
 - provide hidden version of method name starting with prefix
 - provide hidden version of method name substituting brackets
 - provide hidden version of method name substituting equals sign
 - provide hidden version of method name substituting exclamation mark
 - provide hidden version of method name substituting plus sign
 - provide hidden version of method name substituting question mark
 - remove new method
 - respond to original method name after original method has been hidden
 - restore original method
 - return mock for stubbee

date_time_inspect should:

 - use include date in seconds
 - use to s for date
 - use to s for datetime

exception_raiser should:

 - raise exception instance
 - raise exception with specified class and default message
 - raise exception with specified class and message
 - raise interrupt exception with default message so it works in ruby 1 8 6
 - raise subclass of interrupt exception with default message so it works in ruby 1 8 6

expectation_list should:

 - find matching expectation
 - find most recent matching expectation
 - find most recent matching expectation but give preference to those allowing invocations
 - find most recent matching expectation if no matching expectations allow invocations
 - return added expectation

expectation should:

 - allow invocations until expected invocation count is a range from two to three and actual invocation count would be four
 - allow invocations until expected invocation count is one and actual invocation count would be two
 - allow invocations until expected invocation count is two and actual invocation count would be three
 - be in correct order if all ordering constraints allow invocation now
 - be satisfied when minimum number of invocations has been made
 - be satisfied when required invocation has been made
 - change state when expectation is invoked
 - default backtrace to caller
 - increment assertion counter for expectation because it does need verifyng
 - match calls to same method with any parameters
 - match calls to same method with exactly zero parameters
 - match calls to same method with expected parameter values
 - match calls to same method with parameters constrained as expected
 - match if all ordering constraints allow invocation now
 - match when state is active
 - not be in correct order if one ordering constraint does not allow invocation now
 - not be satisfied when minimum number of invocations has not been made
 - not be satisfied when required invocation has not been made
 - not increment assertion counter for stub because it does not need verifying
 - not match calls to different method with parameters constrained as expected
 - not match calls to different methods with no parameters
 - not match calls to same method with more than zero parameters
 - not match calls to same method with parameters not constrained as expected
 - not match calls to same method with too few parameters
 - not match calls to same method with too many parameters
 - not match calls to same method with unexpected parameter values
 - not match if one ordering constraints does not allow invocation now
 - not verify successfully if call expected once but invoked twice
 - not verify successfully if call expected once but not invoked
 - not verify successfully if expected call was made too few times
 - not verify successfully if expected call was made too many times
 - not verify successfully if expected call was not made at least once
 - not yield
 - raise custom exception
 - raise custom exception with message
 - raise error with message indicating which method was expected to be called on which mock object with which parameters and in what sequences
 - raise exception then return values
 - raise runtime exception
 - raise same instance of custom exception
 - return nil by default
 - return nil if no value specified
 - return same specified value multiple times
 - return specified value
 - return specified values on consecutive calls
 - return specified values on consecutive calls even if values are modified
 - return values then raise exception
 - store backtrace from point where expectation was created
 - store provided backtrace
 - tell sequences to constrain expectation as next in sequence
 - use the default exception message
 - verify successfully if call expected once and invoked once
 - verify successfully if expected call was made
 - verify successfully if expected call was made at least once
 - verify successfully if expected call was made expected number of times
 - yield different parameters on consecutive invocations
 - yield multiple times for first invocation and once for second invocation
 - yield multiple times for single invocation
 - yield no parameters
 - yield with specified parameters

hash_inspect should:

 - keep spacing between key value
 - use mocha inspect on each item

in_state_ordering_constraint should:

 - allow invocation when state is active
 - describe itself in terms of the state predicates description

metaclass should:

 - return objects singleton class

method_matcher should:

 - describe what method is expected
 - match if actual method name is same as expected method name
 - not match if actual method name is not same as expected method name

mock should:

 - be able to extend mock object with module
 - be able to mock standard object methods
 - be able to stub standard object methods
 - be equal
 - build and store expectations
 - create and add expectations
 - create and add stubs
 - increment assertion counter for every verified expectation
 - indicate unexpected method called
 - invoke expectation and return result
 - keep returning specified value for expects
 - keep returning specified value for stubs
 - match most recent call to expects
 - match most recent call to expects or stubs
 - match most recent call to stubs
 - match most recent call to stubs or expects
 - not raise error if stubbing everything
 - not raise no method error if mock is not restricted to respond like a responder
 - not raise no method error if responder does respond to invoked method
 - not respond to methods which the responder does not responds to
 - not respond to unexpected method
 - not stub everything by default
 - not verify successfully because not all expectations have been satisfied
 - pass backtrace into expectation
 - pass backtrace into stub
 - raise assertion error for unexpected method call
 - raise no method error if responder does not respond to invoked method
 - raise no method error with message indicating that mock is constrained to respond like responder
 - respond to expected method
 - respond to methods which the responder does responds to
 - return itself to allow method chaining
 - set single expectation
 - set up multiple expectations with return values
 - set up multiple stubs with return values
 - stub everything
 - yield supplied parameters to block

mockery should:

 - build and store new state machine
 - build instance of mockery
 - build instance of stubba on instantiation
 - build new instance of stubba on teardown
 - cache instance of mockery
 - display any instance prefix followed by class whose instances are being impersonated for inspect
 - display any instance prefix followed by class whose instances are being impersonated for mocha inspect
 - display impersonated object for inspect
 - display impersonated object for mocha inspect
 - display name for inspect if mock has string name
 - display name for inspect if mock has symbol name
 - display name for mocha inspect if mock has string name
 - display name for mocha inspect if mock has symbol name
 - display object id for inspect if mock has no name
 - display object id for mocha inspect if mock has no name
 - expire mockery instance cache
 - raise expectation error because not all expectations are satisfied
 - reset list of mocks on teardown
 - reset list of state machines on teardown
 - unstub all methods on teardown

multiple_yields should:

 - provide parameters for multiple yields in single invocation

no_yields should:

 - provide parameters for no yields in single invocation

object_inspect should:

 - return customized string representation of object
 - return default string representation of object not including instance variables
 - use underscored id instead of object id or id so that they can be stubbed

object should:

 - build any instance object
 - build mocha referring to self
 - reset mocha
 - return same any instance object
 - reuse existing mocha
 - stub relevant class for any instance
 - stub self for class
 - stub self for module
 - stub self for object
 - use stubba class method for any instance
 - use stubba class method for class
 - use stubba instance method for object
 - use stubba module method for module

all_of should:

 - describe matcher
 - match if all matchers match
 - not match if any matcher does not match

any_of should:

 - describe matcher
 - match if any matchers match
 - not match if no matchers match

anything should:

 - describe matcher
 - match anything

equals should:

 - describe matcher
 - match object that equals value
 - not match object that does not equal value

has_entries should:

 - describe matcher
 - match hash including specified entries
 - match hash including specified entries with nested key matchers
 - match hash including specified entries with nested value matchers
 - not match hash not including specified entries
 - not match hash not including specified entries with nested key matchers
 - not match hash not including specified entries with nested value matchers

has_entry should:

 - describe matcher with entry
 - describe matcher with key value pair
 - match hash including specified entry
 - match hash including specified entry with nested key matcher
 - match hash including specified entry with nested value matcher
 - match hash including specified key value pair
 - not match hash not including specified entry
 - not match hash not including specified entry with nested key matcher
 - not match hash not including specified entry with nested value matcher
 - not match hash not including specified key value pair

has_key should:

 - describe matcher
 - match hash including specified key
 - match hash including specified key with nested key matcher
 - not match hash not including specified key
 - not match hash not including specified key with nested key matcher

has_value should:

 - describe matcher
 - match hash including specified value
 - match hash including specified value with nested value matcher
 - not match hash not including specified value
 - not match hash not including specified value with nested value matcher

includes should:

 - describe matcher
 - match object including value
 - not match object that does not include value

instance_of should:

 - describe matcher
 - match object that is an instance of specified class
 - not match object that is not an instance of specified class

is_a should:

 - describe matcher
 - match object that is a specified class
 - not match object that is not a specified class

kind_of should:

 - describe matcher
 - match object that is a kind of specified class
 - not match object that is not a kind of specified class

not should:

 - describe matcher
 - match if matcher does not match
 - not match if matcher does match

regexp_matches should:

 - describe matcher
 - match parameter matching regular expression
 - not match parameter not matching regular expression

responds_with should:

 - describe matcher
 - match parameter responding with expected value
 - not match parameter responding with unexpected value

yaml_equivalent should:

 - describe matcher
 - match parameter matching yaml representation of object
 - not match parameter matching yaml representation of object

parameters_matcher should:

 - display numeric arguments as is
 - indicate that matcher will match any actual parameters
 - match any actual parameters if no expected parameters specified
 - match if actual parameters are same as expected parameters
 - match if actual parameters satisfy matching block
 - match if all required and optional parameters match and all optional parameters are supplied
 - match if all required and optional parameters match and some optional parameters are supplied
 - match if all required parameters match and no optional parameters are supplied
 - not match if actual parameters are different from expected parameters
 - not match if actual parameters do not satisfy matching block
 - not match if all required and optional parameters match but too many optional parameters are supplied
 - not match if all required parameters match but no optional parameters match
 - not match if all required parameters match but some optional parameters do not match
 - not match if not all required parameters are supplied
 - not match if some required parameters do not match although all optional parameters do match
 - not match if there are less actual parameters than expected parameters
 - not match if there are more actual parameters than expected parameters
 - not remove curly braces if hash is not the only argument
 - remove curly braces if hash is only argument
 - remove outer array braces

return_values should:

 - build single return values for each values
 - combine two sets of return values
 - keep returning evaluated single return value
 - keep returning last of consecutive evaluated single return values
 - keep returning nil
 - return consecutive evaluated single return values
 - return evaluated single return value
 - return nil

sequence should:

 - add ordering constraint to expectation
 - allow invocation of second method when first in sequence has been invoked
 - be satisfied if no expectations added
 - be satisfied if one satisfied expectations added and it is included by index
 - be satisfied if one unsatisfied expectations added but it is not included by index
 - be satisfied if two satisfied expectations added and both are included by index
 - describe ordering constraint as being part of named sequence
 - not allow invocation of second method when first n sequence has not been invoked
 - not be satisfied if one satisfied and one unsatisfied expectation added and both are included by index
 - not be satisfied if one unsatisfied expectations added and it is included by index

single_return_value should:

 - return value

single_yield should:

 - provide parameters for single yield in single invocation

state_machine should:

 - be able to change state
 - be able to enter a state
 - be put into a new state
 - be put into an initial state
 - describe itself as name and current state
 - have self describing states
 - initially be in no state

string_inspect should:

 - replace escaped quotes with single quote

yield_parameters should:

 - keep returning multiple yield parameter group
 - keep returning single yield parameter group
 - return consecutive multiple yield parameter groups
 - return consecutive single and multiple yield parameter groups
 - return consecutive single yield parameter groups
 - return multiple yield parameter group
 - return null yield parameter group by default
 - return single yield parameter group

[Validate]