Skip to content

k0nserv/TestingUserDefaults

 
 

Repository files navigation

About

This class is a simple NSUserDefaults replacement that can be used in tests. It does not persist any changes, so that each test can start with precisely controlled defaults environment.

CCTestingUserDefaults *defaults = [[CCTestingUserDefaults alloc] init];
// …set up defaults as needed…
ClassThatUsesDefaults *tested = [[ClassThatUsesDefaults alloc] init];
[tested setDefaults:(id)defaults];
// …run tests…

So far the class only supports several of the NSUserDefaults methods, feel free to add more and send me a pull request.

About

Simple NSUserDefaults replacement for testing purposes.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Objective-C 91.8%
  • Ruby 8.2%