Created
          December 5, 2012 21:48 
        
      - 
      
- 
        Save chreke/4219802 to your computer and use it in GitHub Desktop. 
    Eunit and Meck test skeleton
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | foo_tests() -> | |
| {foreach, | |
| fun setup/0, | |
| fun teardown/1, | |
| [{"Should do something", | |
| do_something()}]}. | |
| setup() -> | |
| Mods = [foo, bar], | |
| meck:new(Mods), | |
| meck:expect(foo, do_something_else, 2, "Some return value"), | |
| Mods. | |
| teardown(Mods) -> | |
| meck:unload(Mods). | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment