Skip to content

Commit

Permalink
Merge branch 'move-tests'
Browse files Browse the repository at this point in the history
* move-tests:
  Add Tests for Cells
  Fix Broken Test - selectedDate should be set after the view is loaded
  Add Month HeaderView Snapshots
  Add Snapshot Tests for PDTSimpleCalendarViewController
  Remove reference to Main.storyboard
  Add Host App for Tests & Update Travis script
  Move Tests from Demo Project to Main project
  Fix podspec - Unwanted comma!
  Add Snapshot Tests for WeekdayHeaderView
  • Loading branch information
jmig committed Aug 10, 2015
2 parents e9c861c + 85c74ea commit 27d97d1
Show file tree
Hide file tree
Showing 69 changed files with 876 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ language: objective-c
osx_image: xcode6.4
script:
- pod lib lint --verbose --fail-fast
- xctool -project PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj -scheme PDTSimpleCalendarDemo -sdk iphonesimulator ACTIVE_ARCH_ONLY=0 build test
- xctool -workspace PDTSimpleCalendar.xcworkspace -scheme PDTSimpleCalendar -sdk iphonesimulator ACTIVE_ARCH_ONLY=0 build test
3 changes: 1 addition & 2 deletions PDTSimpleCalendar.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Pod::Spec.new do |s|
s.author = { "Jerome Miglino" => "jerome.miglino@jivesoftware.com" }
s.platform = :ios, '6.0'
s.source = { :git => "https://github.com/jivesoftware/PDTSimpleCalendar.git", :tag => s.version.to_s }
s.source_files = 'PDTSimpleCalendar/*.{h,m}',
s.exclude_files = 'PDTSimpleCalendarDemo'
s.source_files = 'PDTSimpleCalendar/**/*.{h,m}'
s.requires_arc = true

end
300 changes: 272 additions & 28 deletions PDTSimpleCalendar.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "89875F481B755A5400CE4345"
BuildableName = "PDTSimpleCalendarTests.xctest"
BlueprintName = "PDTSimpleCalendarTests"
ReferencedContainer = "container:PDTSimpleCalendar.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -57,6 +67,13 @@
ReferencedContainer = "container:PDTSimpleCalendar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
10 changes: 10 additions & 0 deletions PDTSimpleCalendar.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions PDTSimpleCalendar/PDTSimpleCalendarViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

@end

#import <UIKit/UIKit.h>

/**
* The `PDTSimpleCalendarViewCell` class displays a day in the calendar.
*/
Expand Down Expand Up @@ -116,7 +114,7 @@
*
* @param calendar the calendar.
*/
- (void) setDate:(NSDate*)date calendar:(NSCalendar*)calendar;
- (void)setDate:(NSDate*)date calendar:(NSCalendar*)calendar;

/**
* Force the refresh of the colors for the circle and the text
Expand Down
2 changes: 1 addition & 1 deletion PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef NS_ENUM (NSInteger, PDTSimpleCalendarViewWeekdayTextType) {
@property (nonatomic, strong) UIFont *textFont UI_APPEARANCE_SELECTOR;

/**
* Customize the head background color.
* Customize the header background color.
*/
@property (nonatomic, strong) UIColor *headerBackgroundColor UI_APPEARANCE_SELECTOR;

Expand Down
156 changes: 0 additions & 156 deletions PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,8 @@
8959434D180CB47B007DEC5D /* PDTSimpleCalendarViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89594347180CB47B007DEC5D /* PDTSimpleCalendarViewCell.m */; };
8959434E180CB47B007DEC5D /* PDTSimpleCalendarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89594349180CB47B007DEC5D /* PDTSimpleCalendarViewController.m */; };
8959434F180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 8959434B180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m */; };
8971B48218CEB0D600736D3B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89594314180CB350007DEC5D /* Foundation.framework */; };
8971B48318CEB0D600736D3B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89594318180CB350007DEC5D /* UIKit.framework */; };
8971B48918CEB0D600736D3B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8971B48718CEB0D600736D3B /* InfoPlist.strings */; };
8971B48B18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
8971B48D18CEB0D600736D3B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 89594309180CB350007DEC5D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 89594310180CB350007DEC5D;
remoteInfo = PDTSimpleCalendarDemo;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
1B4E30FA1B6FB97F00BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendarViewWeekdayHeader.h; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h; sourceTree = "<group>"; };
1B4E30FB1B6FB97F00BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewWeekdayHeader.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.m; sourceTree = "<group>"; };
Expand All @@ -58,12 +44,6 @@
89594349180CB47B007DEC5D /* PDTSimpleCalendarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewController.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewController.m; sourceTree = "<group>"; };
8959434A180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendarViewFlowLayout.h; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewFlowLayout.h; sourceTree = "<group>"; };
8959434B180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewFlowLayout.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewFlowLayout.m; sourceTree = "<group>"; };
8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PDTSimpleCalendarDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8971B48618CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PDTSimpleCalendarDemoTests-Info.plist"; sourceTree = "<group>"; };
8971B48818CEB0D600736D3B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarDemoTests.m; sourceTree = "<group>"; };
8971B48C18CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PDTSimpleCalendarDemoTests-Prefix.pch"; sourceTree = "<group>"; };
8971B49218CEB55700736D3B /* PDTSimpleCalendarViewController+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PDTSimpleCalendarViewController+Private.h"; sourceTree = "<group>"; };
89D411BF18109DA1001584CC /* PDTSimpleCalendar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendar.h; path = ../PDTSimpleCalendar/PDTSimpleCalendar.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -78,15 +58,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
8971B47C18CEB0D600736D3B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8971B48318CEB0D600736D3B /* UIKit.framework in Frameworks */,
8971B48218CEB0D600736D3B /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -95,7 +66,6 @@
children = (
89594343180CB46B007DEC5D /* PDTSimpleCalendar */,
8959431A180CB350007DEC5D /* PDTSimpleCalendarDemo */,
8971B48418CEB0D600736D3B /* PDTSimpleCalendarDemoTests */,
89594313180CB350007DEC5D /* Frameworks */,
89594312180CB350007DEC5D /* Products */,
);
Expand All @@ -105,7 +75,6 @@
isa = PBXGroup;
children = (
89594311180CB350007DEC5D /* PDTSimpleCalendarDemo.app */,
8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -161,26 +130,6 @@
name = PDTSimpleCalendar;
sourceTree = "<group>";
};
8971B48418CEB0D600736D3B /* PDTSimpleCalendarDemoTests */ = {
isa = PBXGroup;
children = (
8971B49218CEB55700736D3B /* PDTSimpleCalendarViewController+Private.h */,
8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */,
8971B48518CEB0D600736D3B /* Supporting Files */,
);
path = PDTSimpleCalendarDemoTests;
sourceTree = "<group>";
};
8971B48518CEB0D600736D3B /* Supporting Files */ = {
isa = PBXGroup;
children = (
8971B48618CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Info.plist */,
8971B48718CEB0D600736D3B /* InfoPlist.strings */,
8971B48C18CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -201,24 +150,6 @@
productReference = 89594311180CB350007DEC5D /* PDTSimpleCalendarDemo.app */;
productType = "com.apple.product-type.application";
};
8971B47E18CEB0D600736D3B /* PDTSimpleCalendarDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8971B49118CEB0D600736D3B /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarDemoTests" */;
buildPhases = (
8971B47B18CEB0D600736D3B /* Sources */,
8971B47C18CEB0D600736D3B /* Frameworks */,
8971B47D18CEB0D600736D3B /* Resources */,
);
buildRules = (
);
dependencies = (
8971B48E18CEB0D600736D3B /* PBXTargetDependency */,
);
name = PDTSimpleCalendarDemoTests;
productName = PDTSimpleCalendarDemoTests;
productReference = 8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -229,11 +160,6 @@
LastTestingUpgradeCheck = 0610;
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = Producteev;
TargetAttributes = {
8971B47E18CEB0D600736D3B = {
TestTargetID = 89594310180CB350007DEC5D;
};
};
};
buildConfigurationList = 8959430C180CB350007DEC5D /* Build configuration list for PBXProject "PDTSimpleCalendarDemo" */;
compatibilityVersion = "Xcode 3.2";
Expand All @@ -248,7 +174,6 @@
projectRoot = "";
targets = (
89594310180CB350007DEC5D /* PDTSimpleCalendarDemo */,
8971B47E18CEB0D600736D3B /* PDTSimpleCalendarDemoTests */,
);
};
/* End PBXProject section */
Expand All @@ -263,14 +188,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
8971B47D18CEB0D600736D3B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8971B48918CEB0D600736D3B /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -288,24 +205,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
8971B47B18CEB0D600736D3B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8971B48B18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
8971B48E18CEB0D600736D3B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 89594310180CB350007DEC5D /* PDTSimpleCalendarDemo */;
targetProxy = 8971B48D18CEB0D600736D3B /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
8959431D180CB350007DEC5D /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
Expand All @@ -315,14 +216,6 @@
name = InfoPlist.strings;
sourceTree = "<group>";
};
8971B48718CEB0D600736D3B /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
8971B48818CEB0D600736D3B /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -424,46 +317,6 @@
};
name = Release;
};
8971B48F18CEB0D600736D3B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarDemo.app/PDTSimpleCalendarDemo";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Debug;
};
8971B49018CEB0D600736D3B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarDemo.app/PDTSimpleCalendarDemo";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch";
INFOPLIST_FILE = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -485,15 +338,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8971B49118CEB0D600736D3B /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8971B48F18CEB0D600736D3B /* Debug */,
8971B49018CEB0D600736D3B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 89594309180CB350007DEC5D /* Project object */;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.producteev.${PRODUCT_NAME:rfc1034identifier}</string>
<string>com.producteev.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
Expand Down
Loading

0 comments on commit 27d97d1

Please sign in to comment.