-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode 10 changes for test schemes #583
Conversation
added: * parallelization * randomized test order * whitelisted tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good! Just a couple of style nits
spec/scheme/test_action_spec.rb
Outdated
@@ -221,6 +221,7 @@ module Xcodeproj | |||
test_ref.xml_element.name.should == 'TestableReference' | |||
test_ref.xml_element.attributes.count.should == 1 | |||
test_ref.xml_element.attributes['skipped'].should == 'NO' | |||
test_ref.randomized?.should.be.false? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_ref.should.not.be.randomized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not know abt this syntax!
lib/xcodeproj/scheme/test_action.rb
Outdated
# Set the list of SelectedTest this action will run. | ||
# | ||
def selected_tests=(tests) | ||
@xml_element.delete_element('SelectedTests') unless @xml_element.elements['SelectedTests'].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to delete the conditional on this line -- calling delete
with a parameter that's not in the collection will just return nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is copied from skipped_tests=
so i removed it there too
lib/xcodeproj/scheme/test_action.rb
Outdated
# | ||
def selected_tests=(tests) | ||
@xml_element.delete_element('SelectedTests') unless @xml_element.elements['SelectedTests'].nil? | ||
if tests.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return if tests.nil?
spec/scheme/test_action_spec.rb
Outdated
describe 'randomized' do | ||
it '#randomized? detect a true value' do | ||
@sut.xml_element.attributes['testExecutionOrdering'] = 'random' | ||
@sut.randomized?.should == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sut.should.be.randomized
spec/scheme/test_action_spec.rb
Outdated
|
||
it '#randomized= set false value' do | ||
@sut.randomized = false | ||
@sut.xml_element.attributes['testExecutionOrdering'].should.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should.be.nil
fixed @segiddins's review in 0a2137e |
🚢 |
added: