Skip to content

Commit 5fac9f0

Browse files
committed
Merge pull request #84 from specta/develop
Release Expecta 0.3.0
2 parents 3545a3e + 10b6439 commit 5fac9f0

File tree

4 files changed

+47
-36
lines changed

4 files changed

+47
-36
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v0.3.0
2+
======
3+
* Adds support for Xcode/Apple LLVM 5.1, which means turning off Garbage Collection support [tonyarnold]
4+
* Raises minimum deployment targets to iOS 5.x and OS X 10.7 [tonyarnold]
5+
6+
17
v0.2.2
28
======
39

Expecta.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Expecta'
3-
s.version = '0.2.4'
3+
s.version = '0.3.0'
44
s.license = { :type => 'MIT', :file => 'LICENSE' }
55
s.summary = 'A matcher framework for Objective-C & Cocoa.'
66
s.homepage = 'http://github.com/petejkim/expecta'
@@ -19,8 +19,8 @@ Pod::Spec.new do |s|
1919
s.source_files = 'src/**/*.{h,m}'
2020

2121
s.requires_arc = false
22-
s.ios.deployment_target = '4.0'
23-
s.osx.deployment_target = '10.6'
22+
s.ios.deployment_target = '5.0'
23+
s.osx.deployment_target = '10.7'
2424

2525
s.frameworks = 'Foundation'
2626
end

Expecta.xcodeproj/project.pbxproj

+4-6
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@
12631263
DSTROOT = /tmp/Expecta_iOS.dst;
12641264
GCC_PRECOMPILE_PREFIX_HEADER = YES;
12651265
GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch";
1266-
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
1266+
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
12671267
PRIVATE_HEADERS_FOLDER_PATH = "";
12681268
PRODUCT_NAME = "$(TARGET_NAME)";
12691269
PUBLIC_HEADERS_FOLDER_PATH = "";
@@ -1281,7 +1281,7 @@
12811281
DSTROOT = /tmp/Expecta_iOS.dst;
12821282
GCC_PRECOMPILE_PREFIX_HEADER = YES;
12831283
GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch";
1284-
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
1284+
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
12851285
PRIVATE_HEADERS_FOLDER_PATH = "";
12861286
PRODUCT_NAME = "$(TARGET_NAME)";
12871287
PUBLIC_HEADERS_FOLDER_PATH = "";
@@ -1361,7 +1361,7 @@
13611361
GCC_WARN_ABOUT_RETURN_TYPE = YES;
13621362
GCC_WARN_UNINITIALIZED_AUTOS = YES;
13631363
GCC_WARN_UNUSED_VARIABLE = YES;
1364-
MACOSX_DEPLOYMENT_TARGET = 10.6;
1364+
MACOSX_DEPLOYMENT_TARGET = 10.7;
13651365
ONLY_ACTIVE_ARCH = YES;
13661366
SDKROOT = macosx;
13671367
};
@@ -1381,7 +1381,7 @@
13811381
GCC_WARN_ABOUT_RETURN_TYPE = YES;
13821382
GCC_WARN_UNINITIALIZED_AUTOS = YES;
13831383
GCC_WARN_UNUSED_VARIABLE = YES;
1384-
MACOSX_DEPLOYMENT_TARGET = 10.6;
1384+
MACOSX_DEPLOYMENT_TARGET = 10.7;
13851385
SDKROOT = macosx;
13861386
};
13871387
name = Release;
@@ -1392,7 +1392,6 @@
13921392
ALWAYS_SEARCH_USER_PATHS = NO;
13931393
GCC_DYNAMIC_NO_PIC = NO;
13941394
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
1395-
GCC_ENABLE_OBJC_GC = supported;
13961395
GCC_PRECOMPILE_PREFIX_HEADER = YES;
13971396
GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch";
13981397
PRIVATE_HEADERS_FOLDER_PATH = "";
@@ -1407,7 +1406,6 @@
14071406
ALWAYS_SEARCH_USER_PATHS = NO;
14081407
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
14091408
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
1410-
GCC_ENABLE_OBJC_GC = supported;
14111409
GCC_PRECOMPILE_PREFIX_HEADER = YES;
14121410
GCC_PREFIX_HEADER = "src/Expecta-Prefix.pch";
14131411
PRIVATE_HEADERS_FOLDER_PATH = "";

README.md

+34-27
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# Expecta
1+
#Expecta
22

33
A Matcher Framework for Objective-C/Cocoa
44

55
## NOTICE
66

7-
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.
7+
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.
8+
9+
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.
810

911
## INTRODUCTION
1012

@@ -17,14 +19,11 @@ assertThat(@"foo", is(equalTo(@"foo")));
1719
assertThatUnsignedInteger(foo, isNot(equalToUnsignedInteger(1)));
1820
assertThatBool([bar isBar], is(equalToBool(YES)));
1921
assertThatDouble(baz, is(equalToDouble(3.14159)));
20-
```
21-
22-
vs.
22+
``` vs. **Expecta **
2323
24-
**Expecta**
25-
26-
```objective-c
27-
expect(@"foo").to.equal(@"foo"); // `to` is a syntatic sugar and can be safely omitted.
24+
```objective -
25+
c expect(@"foo").to.equal(
26+
@"foo"); // `to` is a syntatic sugar and can be safely omitted.
2827
expect(foo).notTo.equal(1);
2928
expect([bar isBar]).to.equal(YES);
3029
expect(baz).to.equal(3.14159);
@@ -36,12 +35,12 @@ Use [CocoaPods](https://github.com/CocoaPods/CocoaPods)
3635

3736
```ruby
3837
target :MyApp do
39-
# your app dependencies
38+
#your app dependencies
4039
end
4140

4241
target :MyAppTests do
4342
pod 'Expecta', '~> 0.2.4' # expecta matchers
44-
# pod 'Specta', '~> 0.1.11' # specta bdd framework
43+
#pod 'Specta', '~> 0.1.11' #specta bdd framework
4544
end
4645
```
4746

@@ -150,7 +149,8 @@ Writing a new matcher is easy with special macros provided by Expecta. Take a lo
150149

151150
EXPMatcherInterface(beKindOf, (Class expected));
152151
// 1st argument is the name of the matcher function
153-
// 2nd argument is the list of arguments that may be passed in the function call.
152+
// 2nd argument is the list of arguments that may be passed in the function
153+
// call.
154154
// Multiple arguments are fine. (e.g. (int foo, float bar))
155155

156156
#define beAKindOf beKindOf
@@ -165,33 +165,40 @@ EXPMatcherImplementationBegin(beKindOf, (Class expected)) {
165165
BOOL actualIsNil = (actual == nil);
166166
BOOL expectedIsNil = (expected == nil);
167167
168-
prerequisite(^BOOL{
168+
prerequisite(^BOOL {
169169
return !(actualIsNil || expectedIsNil);
170-
// Return `NO` if matcher should fail whether or not the result is inverted using `.Not`.
170+
// Return `NO` if matcher should fail whether or not the result is inverted
171+
// using `.Not`.
171172
});
172173
173-
match(^BOOL{
174+
match(^BOOL {
174175
return [actual isKindOfClass:expected];
175176
// Return `YES` if the matcher should pass, `NO` if it should not.
176177
// The actual value/object is passed as `actual`.
177178
// Please note that primitive values will be wrapped in NSNumber/NSValue.
178179
});
179180
180-
failureMessageForTo(^NSString *{
181-
if(actualIsNil) return @"the actual value is nil/null";
182-
if(expectedIsNil) return @"the expected value is nil/null";
183-
return [NSString stringWithFormat:@"expected: a kind of %@, "
184-
"got: an instance of %@, which is not a kind of %@",
185-
[expected class], [actual class], [expected class]];
181+
failureMessageForTo(^NSString * {
182+
if (actualIsNil)
183+
return @"the actual value is nil/null";
184+
if (expectedIsNil)
185+
return @"the expected value is nil/null";
186+
return [NSString
187+
stringWithFormat:@"expected: a kind of %@, "
188+
"got: an instance of %@, which is not a kind of %@",
189+
[expected class], [actual class], [expected class]];
186190
// Return the message to be displayed when the match function returns `YES`.
187191
});
188192
189-
failureMessageForNotTo(^NSString *{
190-
if(actualIsNil) return @"the actual value is nil/null";
191-
if(expectedIsNil) return @"the expected value is nil/null";
192-
return [NSString stringWithFormat:@"expected: not a kind of %@, "
193-
"got: an instance of %@, which is a kind of %@",
194-
[expected class], [actual class], [expected class]];
193+
failureMessageForNotTo(^NSString * {
194+
if (actualIsNil)
195+
return @"the actual value is nil/null";
196+
if (expectedIsNil)
197+
return @"the expected value is nil/null";
198+
return [NSString
199+
stringWithFormat:@"expected: not a kind of %@, "
200+
"got: an instance of %@, which is a kind of %@",
201+
[expected class], [actual class], [expected class]];
195202
// Return the message to be displayed when the match function returns `NO`.
196203
});
197204
}

0 commit comments

Comments
 (0)