spec/test_task_spec.rb in xctasks-0.4.0 vs spec/test_task_spec.rb in xctasks-0.4.1
- old
+ new
@@ -79,10 +79,11 @@
let!(:task) do
XCTasks::TestTask.new do |t|
t.workspace = 'LayerKit.xcworkspace'
t.schemes_dir = 'Tests/Schemes'
t.runner = :xcpretty
+ t.redirect_stderr = true
t.subtasks = { unit: 'Unit Tests', functional: 'Functional Tests' }
end
end
it "configures the workspace" do
@@ -113,11 +114,11 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == ["mkdir -p LayerKit.xcworkspace/xcshareddata/xcschemes",
"cp [] LayerKit.xcworkspace/xcshareddata/xcschemes",
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Unit Tests' -sdk iphonesimulator clean build test 2>/dev/null | xcpretty -c ; exit ${PIPESTATUS[0]}"]
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Unit Tests' -sdk iphonesimulator clean build test 2> /dev/null | xcpretty -c ; exit ${PIPESTATUS[0]}"]
end
end
describe 'spec:functional' do
subject { Rake.application['test:functional'] }
@@ -125,11 +126,11 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == ["mkdir -p LayerKit.xcworkspace/xcshareddata/xcschemes",
"cp [] LayerKit.xcworkspace/xcshareddata/xcschemes",
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test 2>/dev/null | xcpretty -c ; exit ${PIPESTATUS[0]}"]
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test 2> /dev/null | xcpretty -c ; exit ${PIPESTATUS[0]}"]
end
end
end
end
@@ -151,11 +152,11 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == ["mkdir -p LayerKit.xcworkspace/xcshareddata/xcschemes",
"cp [] LayerKit.xcworkspace/xcshareddata/xcschemes",
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Unit Tests' -sdk iphonesimulator clean build test | tee -a output.log 2>/dev/null | xcpretty -s ; exit ${PIPESTATUS[0]}"]
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Unit Tests' -sdk iphonesimulator clean build test | tee -a output.log | xcpretty -s ; exit ${PIPESTATUS[0]}"]
end
end
describe 'spec:functional' do
subject { Rake.application['test:functional'] }
@@ -163,11 +164,11 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == ["mkdir -p LayerKit.xcworkspace/xcshareddata/xcschemes",
"cp [] LayerKit.xcworkspace/xcshareddata/xcschemes",
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test | tee -a output.log 2>/dev/null | xcpretty -s ; exit ${PIPESTATUS[0]}"]
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test | tee -a output.log | xcpretty -s ; exit ${PIPESTATUS[0]}"]
end
end
end
end
@@ -245,11 +246,11 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == [
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test 2>/dev/null"
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator clean build test"
]
end
end
end
end
@@ -265,10 +266,11 @@
end
t.subtask :functional do |s|
s.runner = :xcodebuild
s.scheme = 'Functional Tests'
+ s.redirect_stderr = 'stderr.log'
s.destination do |d|
d.platform = :iossimulator
d.name = 'iPad Retina'
d.os = :latest
end
@@ -297,10 +299,10 @@
it "executes the appropriate commands" do
subject.invoke
@commands.should == [
"killall \"iPhone Simulator\"",
- "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator -destination platform='iOS Simulator',name='iPad Retina',OS='latest' -destination platform\\=iOS\\ Simulator,OS\\=7.1,name\\=iPhone\\ Retina\\ \\(4-inch\\) -destination platform='iOS',id='437750527b43cff55a46f42ae86dbf870c7591b1' clean build test 2>/dev/null"]
+ "/usr/bin/xcodebuild -workspace LayerKit.xcworkspace -scheme 'Functional Tests' -sdk iphonesimulator -destination platform='iOS Simulator',name='iPad Retina',OS='latest' -destination platform\\=iOS\\ Simulator,OS\\=7.1,name\\=iPhone\\ Retina\\ \\(4-inch\\) -destination platform='iOS',id='437750527b43cff55a46f42ae86dbf870c7591b1' clean build test 2> stderr.log"]
end
end
end
describe 'SDK Configuration' do