spec/generate_spec.rb in cocoapods-playgrounds-1.2.1 vs spec/generate_spec.rb in cocoapods-playgrounds-1.2.2
- old
+ new
@@ -10,11 +10,12 @@
end
it 'can list available platforms for Playgrounds' do
platforms = PlaygroundGenerator.platforms
- platforms.should == [:ios, :osx, :tvos]
+ expected_platforms = PlaygroundGenerator.major_version == 8 ? [:ios, :macos, :tvos] : [:ios, :osx, :tvos]
+ platforms.should == expected_platforms
end
it 'returns nil if template for platform cannot be found' do
platform = PlaygroundGenerator.dir_for_platform(:watchos)
@@ -22,10 +23,11 @@
end
it 'can find the template for OS X' do
platform = PlaygroundGenerator.dir_for_platform(:osx)
- platform.to_s.end_with?('OS X').should == true
+ suffix = PlaygroundGenerator.major_version == 8 ? 'macOS' : 'OS X'
+ platform.to_s.end_with?(suffix).should == true
end
it 'can find the template for iOS' do
platform = PlaygroundGenerator.dir_for_platform(:ios)