Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Wales authored and Kevin Wales committed Nov 12, 2013
1 parent fa692b6 commit 3464fca
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
Expand Up @@ -94,7 +94,7 @@ module XCConfig
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-weak_framework iAd'
end

it "adds the developer frameworks search paths if needed" do
it "adds the ios developer frameworks search paths if needed" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
Expand All @@ -104,7 +104,22 @@ module XCConfig
:platform_name => :ios
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.include('SDKROOT')
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.not.include('DEVELOPER_LIBRARY_DIR')
end

it "adds the osx developer frameworks search paths if needed" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => [],
:frameworks => ['SenTestingKit'],
:weak_frameworks => [],
:platform_name => :osx
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.include('DEVELOPER_LIBRARY_DIR')
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.not.include('SDKROOT')
end
end

Expand Down Expand Up @@ -159,7 +174,7 @@ module XCConfig
frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
frameworks_search_paths.should.include?('$(inherited)')
frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"')
frameworks_search_paths.should.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
frameworks_search_paths.should.not.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
end

it "adds the developer frameworks search paths to the xcconfig if XCTest has been detected" do
Expand All @@ -168,7 +183,7 @@ module XCConfig
frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
frameworks_search_paths.should.include?('$(inherited)')
frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"')
frameworks_search_paths.should.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
frameworks_search_paths.should.not.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
end

it "doesn't adds the developer frameworks relative to the SDK for OS X" do
Expand Down

0 comments on commit 3464fca

Please sign in to comment.