NSString+ZZPathTests.m 744 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // ZZFoundationTests.m
  3. // ZZFoundationTests
  4. //
  5. // Created by bymiracles@163.com on 12/24/2020.
  6. // Copyright (c) 2020 bymiracles@163.com. All rights reserved.
  7. //
  8. // https://github.com/kiwi-bdd/Kiwi
  9. #import <Kiwi/Kiwi.h>
  10. #import <ZZFoundation.h>
  11. SPEC_BEGIN(StringPath)
  12. describe(@"StringEx", ^{
  13. context(@"of cache", ^{
  14. __block id value = nil;
  15. beforeEach(^{
  16. value = [@"fileName" ZZCacheDir];
  17. });
  18. afterEach(^{
  19. value = nil;
  20. });
  21. it(@"should not ne nil", ^{
  22. [[value shouldNot] beNil];
  23. });
  24. it(@"should contain \"fileName\"", ^{
  25. [[[value lastPathComponent]should] equal:@"fileName"];
  26. });
  27. });
  28. });
  29. SPEC_END