/
TODO
57 lines (46 loc) · 3.53 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
- performance tests run markedly slower in ruby 1.9.2 - needs investigation
- method dispatch in jmock changed from version 1 to 2 - see http://www.jmock.org/jmock1-dispatch.html to http://www.jmock.org/dispatch.html - notably the order in which the matching happens is reversed - mocha currently resembles jmock 1.
- rake should not be a non-development dependency in gemspec
- possibly move version constant into separate file and/or use version bumper gem?
- figure out how different versions of minitest fit in with different versions of ruby 1.9 and make sure integration works for each
- unstub should use the same code in ClassMethod/InstanceMethod/etc classes e.g. remove_new_method, restore_original_method, etc
=> Patch [#15235] Provide a pseudo-call syntax for simplifying set-up of expectations and stubs
=> Patch [#10412] Merge 'with' and the expected method
=> Bug [#8687] Block's return value is dropped on stubbed yielding methods
=> interesting links
- http://www.jmock.org/match-object-or-method.html
- http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/106-12985-with_block_which_returns-val
- think about making class_method_test & any_instance_method_test more blackbox to avoid ruby warnings
=> update vendor libraries
- does updating meta_project have any effect on broken tarball issue?
=> release management
- why does gem rdoc include all source files? what about other package types?
- why does zip include Rakefile? what about other package types?
- tag releases in repos
- trac?
=> multiple expectations for same method
- fail fast if expectation count exceeded during test...? c.f. JMock?
=> reduce footprint of mocha in terms of visible methods
- do away with __is_a__ method if possible - Proc param may no longer be needed
- add similar test to test_should_be_able_to_mock_standard_object_methods for partial mocks - rename non-public method with underscores e.g. mocha, reset_mocha, stubba_method, stubba_object, etc.
- reduce number of methods added to Object, Class etc to bare minimum
- reduce number of methods excluded from undef in Mock (maybe use BlankSlate as mocha parent class to allow mocking of standard object methods?)
- perhaps only add methods to particular class at point where expects or stubs gets called
- provide some means to un-stubba an object - ideally should restore any methods with same names as stubba methods c.f. dealing with expectations for methods called :expects, :stubs, etc.
- use Object#inspect(:mocha) or Object#__inspect__ instead of Object#mocha_inspect?
=> improve design
- use builder object c.f. JMock
- use expectation builder object to allow partial mocks to accept a hash in expects or stubs methods
- possibly simplify by making mock the same as a partial mock of Object
- provide test::unit agnostic api - mockery/context type objects on which the user must call setup/teardown?
- allow stubs/expects methods to accept method names as strings and symbols to retain similarity to define_method() et al
=> naming
- default mock names to mock1, mock2, etc or something similar
- stubba mocks should named according to parent stubbee
=> improve tests
- use real activerecord as svn external to for testing instead of active_record_test_case
- test for setting expectations on class methods (and instance methods?) from within TestCase#setup
=> possible extra functionality
- maybe allow unstubbing of a specific method from within a test...?
- oomatron type ideas
- should all instances share expectations for any_instance or should each instance have their own - in which case how do we provide access to the instances