From 4f51087db9ae9374e8aa032fb8325a93141c8de7 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Fri, 20 Dec 2013 13:23:55 +1100 Subject: [PATCH 1/9] =?UTF-8?q?Garbage=20collection=20is=20officially=20de?= =?UTF-8?q?precated=20=E2=80=94=20turn=20it=20off?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Expecta.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/Expecta.xcodeproj/project.pbxproj b/Expecta.xcodeproj/project.pbxproj index b46c516..f9264c6 100644 --- a/Expecta.xcodeproj/project.pbxproj +++ b/Expecta.xcodeproj/project.pbxproj @@ -1350,7 +1350,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch"; PRIVATE_HEADERS_FOLDER_PATH = ""; @@ -1365,7 +1364,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch"; PRIVATE_HEADERS_FOLDER_PATH = ""; From 2faeed2a67fef5bee2552348f88485d324382df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20B=C3=B6hnke?= Date: Tue, 25 Feb 2014 21:12:40 -0500 Subject: [PATCH 2/9] Increase version number --- Expecta.podspec | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Expecta.podspec b/Expecta.podspec index b4e98b4..7877f4d 100644 --- a/Expecta.podspec +++ b/Expecta.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'Expecta' - s.version = '0.2.3' + s.version = '0.2.4' s.license = 'MIT' s.summary = 'A matcher framework for Objective-C & Cocoa.' s.homepage = 'http://github.com/petejkim/expecta' s.author = { 'Peter Jihoon Kim' => 'raingrove@gmail.com' } - s.source = { :git => 'https://github.com/specta/expecta.git', :tag => 'v0.2.3' } + s.source = { :git => 'https://github.com/specta/expecta.git', :tag => 'v0.2.4' } s.description = %{ Expecta is a matcher framework for Objective-C and Cocoa. The main diff --git a/README.md b/README.md index 03fd50f..2296ccf 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ target :MyApp do end target :MyAppTests do - pod 'Expecta', '~> 0.2.3' # expecta matchers + pod 'Expecta', '~> 0.2.4' # expecta matchers # pod 'Specta', '~> 0.1.11' # specta bdd framework end ``` From b366552071b9c0cc28986145ef55070d8b42fa18 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 26 Feb 2014 23:35:58 +1100 Subject: [PATCH 3/9] Update podspec to reduce maintenance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From here on out, just update the `s.version` field — don't worry about the tag, it will take care of itself! --- Expecta.podspec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Expecta.podspec b/Expecta.podspec index 7877f4d..507ee89 100644 --- a/Expecta.podspec +++ b/Expecta.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.homepage = 'http://github.com/petejkim/expecta' s.author = { 'Peter Jihoon Kim' => 'raingrove@gmail.com' } - s.source = { :git => 'https://github.com/specta/expecta.git', :tag => 'v0.2.4' } + s.source = { :git => 'https://github.com/specta/expecta.git', :tag => "#{s.version}" } s.description = %{ Expecta is a matcher framework for Objective-C and Cocoa. The main @@ -20,4 +20,3 @@ Pod::Spec.new do |s| s.frameworks = 'Foundation' end - From 460e827fe8424920e720049efb530c295ae9ff2e Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 26 Feb 2014 23:41:35 +1100 Subject: [PATCH 4/9] Add license format, disable ARC and add deployment targets to podspec Also fixes format of tag version string. Passes `pod spec lint` validation. --- Expecta.podspec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Expecta.podspec b/Expecta.podspec index 507ee89..dd2802f 100644 --- a/Expecta.podspec +++ b/Expecta.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'Expecta' s.version = '0.2.4' - s.license = 'MIT' + s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A matcher framework for Objective-C & Cocoa.' s.homepage = 'http://github.com/petejkim/expecta' s.author = { 'Peter Jihoon Kim' => 'raingrove@gmail.com' } - s.source = { :git => 'https://github.com/specta/expecta.git', :tag => "#{s.version}" } + s.source = { :git => 'https://github.com/specta/expecta.git', :tag => "v#{s.version}" } s.description = %{ Expecta is a matcher framework for Objective-C and Cocoa. The main @@ -18,5 +18,9 @@ Pod::Spec.new do |s| s.source_files = 'src/**/*.{h,m}' + s.requires_arc = false + s.ios.deployment_target = '4.0' + s.osx.deployment_target = '10.6' + s.frameworks = 'Foundation' end From 1fc269819c1d777fb167da02c21b50a539892681 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 5 Mar 2014 12:31:41 +1100 Subject: [PATCH 5/9] Expecta now targets iOS 5.x and greater and OS X 10.7 and greater --- Expecta.podspec | 4 ++-- Expecta.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Expecta.podspec b/Expecta.podspec index dd2802f..ad71783 100644 --- a/Expecta.podspec +++ b/Expecta.podspec @@ -19,8 +19,8 @@ Pod::Spec.new do |s| s.source_files = 'src/**/*.{h,m}' s.requires_arc = false - s.ios.deployment_target = '4.0' - s.osx.deployment_target = '10.6' + s.ios.deployment_target = '5.0' + s.osx.deployment_target = '10.7' s.frameworks = 'Foundation' end diff --git a/Expecta.xcodeproj/project.pbxproj b/Expecta.xcodeproj/project.pbxproj index 212a409..6695784 100644 --- a/Expecta.xcodeproj/project.pbxproj +++ b/Expecta.xcodeproj/project.pbxproj @@ -1263,7 +1263,7 @@ DSTROOT = /tmp/Expecta_iOS.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; @@ -1281,7 +1281,7 @@ DSTROOT = /tmp/Expecta_iOS.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; @@ -1361,7 +1361,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -1381,7 +1381,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; + MACOSX_DEPLOYMENT_TARGET = 10.7; SDKROOT = macosx; }; name = Release; From b279a80ca694553132262a96d08b5c5d80726c84 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 5 Mar 2014 12:32:32 +1100 Subject: [PATCH 6/9] Add a note about 0.3.x dropping support for garbage collected targets --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2296ccf..9b110fb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ A Matcher Framework for Objective-C/Cocoa ## NOTICE -Expecta 0.2.x has a new syntax that is slightly different from Expecta 0.1.x. For example `expect(x).toEqual(y)` should now be written as `expect(x).to.equal(y)`. You can do `#define EXP_OLD_SYNTAX` before importing `Expecta.h` to enable backward-compatiblity mode, but keep in mind that the old syntax is deprecated. +Expecta 0.3.x removes support for Garbage Collected targets, as support for these has been removed from Xcode 5.1 and greater. If you need Garbage Collection support, please continue to use Expecta 0.2.4. + +Expecta 0.2.x and later has a new syntax that is slightly different from Expecta 0.1.x. For example `expect(x).toEqual(y)` should now be written as `expect(x).to.equal(y)`. You can do `#define EXP_OLD_SYNTAX` before importing `Expecta.h` to enable backward-compatiblity mode, but keep in mind that the old syntax is deprecated. ## INTRODUCTION From 020a6bc4cf98428b0f30754d5e77df2c3a2ec551 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 5 Mar 2014 12:32:44 +1100 Subject: [PATCH 7/9] Bump podspec version --- Expecta.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Expecta.podspec b/Expecta.podspec index ad71783..a5450dc 100644 --- a/Expecta.podspec +++ b/Expecta.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Expecta' - s.version = '0.2.4' + s.version = '0.3.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A matcher framework for Objective-C & Cocoa.' s.homepage = 'http://github.com/petejkim/expecta' From e5ce028c2477088f23d759d573a1ee032821145c Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 5 Mar 2014 12:45:28 +1100 Subject: [PATCH 8/9] Add a note about the updated minimum targets in v0.3.0 to the README --- README.md | 59 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9b110fb..51c08ac 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Expecta +#Expecta A Matcher Framework for Objective-C/Cocoa ## NOTICE -Expecta 0.3.x removes support for Garbage Collected targets, as support for these has been removed from Xcode 5.1 and greater. If you need Garbage Collection support, please continue to use Expecta 0.2.4. +Expecta 0.3.x removes support for Garbage Collected targets, as support for these has been removed from Xcode 5.1 and greater. If you need Garbage Collection support, please continue to use Expecta 0.2.4. The minimum deployment targets have also been raised to iOS 5.x and OS X 10.7 or greater. Expecta 0.2.x and later has a new syntax that is slightly different from Expecta 0.1.x. For example `expect(x).toEqual(y)` should now be written as `expect(x).to.equal(y)`. You can do `#define EXP_OLD_SYNTAX` before importing `Expecta.h` to enable backward-compatiblity mode, but keep in mind that the old syntax is deprecated. @@ -19,14 +19,11 @@ assertThat(@"foo", is(equalTo(@"foo"))); assertThatUnsignedInteger(foo, isNot(equalToUnsignedInteger(1))); assertThatBool([bar isBar], is(equalToBool(YES))); assertThatDouble(baz, is(equalToDouble(3.14159))); -``` - -vs. +``` vs. **Expecta ** -**Expecta** - -```objective-c -expect(@"foo").to.equal(@"foo"); // `to` is a syntatic sugar and can be safely omitted. +```objective - + c expect(@"foo").to.equal( + @"foo"); // `to` is a syntatic sugar and can be safely omitted. expect(foo).notTo.equal(1); expect([bar isBar]).to.equal(YES); expect(baz).to.equal(3.14159); @@ -38,12 +35,12 @@ Use [CocoaPods](https://github.com/CocoaPods/CocoaPods) ```ruby target :MyApp do - # your app dependencies +#your app dependencies end target :MyAppTests do pod 'Expecta', '~> 0.2.4' # expecta matchers - # pod 'Specta', '~> 0.1.11' # specta bdd framework +#pod 'Specta', '~> 0.1.11' #specta bdd framework end ``` @@ -152,7 +149,8 @@ Writing a new matcher is easy with special macros provided by Expecta. Take a lo EXPMatcherInterface(beKindOf, (Class expected)); // 1st argument is the name of the matcher function -// 2nd argument is the list of arguments that may be passed in the function call. +// 2nd argument is the list of arguments that may be passed in the function +// call. // Multiple arguments are fine. (e.g. (int foo, float bar)) #define beAKindOf beKindOf @@ -167,33 +165,40 @@ EXPMatcherImplementationBegin(beKindOf, (Class expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); - prerequisite(^BOOL{ + prerequisite(^BOOL { return !(actualIsNil || expectedIsNil); - // Return `NO` if matcher should fail whether or not the result is inverted using `.Not`. + // Return `NO` if matcher should fail whether or not the result is inverted + // using `.Not`. }); - match(^BOOL{ + match(^BOOL { return [actual isKindOfClass:expected]; // Return `YES` if the matcher should pass, `NO` if it should not. // The actual value/object is passed as `actual`. // Please note that primitive values will be wrapped in NSNumber/NSValue. }); - failureMessageForTo(^NSString *{ - if(actualIsNil) return @"the actual value is nil/null"; - if(expectedIsNil) return @"the expected value is nil/null"; - return [NSString stringWithFormat:@"expected: a kind of %@, " - "got: an instance of %@, which is not a kind of %@", - [expected class], [actual class], [expected class]]; + failureMessageForTo(^NSString * { + if (actualIsNil) + return @"the actual value is nil/null"; + if (expectedIsNil) + return @"the expected value is nil/null"; + return [NSString + stringWithFormat:@"expected: a kind of %@, " + "got: an instance of %@, which is not a kind of %@", + [expected class], [actual class], [expected class]]; // Return the message to be displayed when the match function returns `YES`. }); - failureMessageForNotTo(^NSString *{ - if(actualIsNil) return @"the actual value is nil/null"; - if(expectedIsNil) return @"the expected value is nil/null"; - return [NSString stringWithFormat:@"expected: not a kind of %@, " - "got: an instance of %@, which is a kind of %@", - [expected class], [actual class], [expected class]]; + failureMessageForNotTo(^NSString * { + if (actualIsNil) + return @"the actual value is nil/null"; + if (expectedIsNil) + return @"the expected value is nil/null"; + return [NSString + stringWithFormat:@"expected: not a kind of %@, " + "got: an instance of %@, which is a kind of %@", + [expected class], [actual class], [expected class]]; // Return the message to be displayed when the match function returns `NO`. }); } From 8cce1e5e40f32b51b26088a40614bbb9c39a33cd Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 5 Mar 2014 12:50:00 +1100 Subject: [PATCH 9/9] Update Changelog for v0.3.0 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5849e..82f8dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +v0.3.0 +====== +* Adds support for Xcode/Apple LLVM 5.1, which means turning off Garbage Collection support [tonyarnold] +* Raises minimum deployment targets to iOS 5.x and OS X 10.7 [tonyarnold] + + v0.2.2 ======