Skip to content
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

Improve test target detection in xcodeproj_helper #251

Merged
merged 1 commit into from
Nov 20, 2015
Merged

Conversation

gfontenot
Copy link
Member

Now that we have customizable test target names, we can use that to
detect test targets instead of just looking for the suffix "Tests".

Fixes #218 (finally)

Now that we have customizable test target names, we can use that to
detect test targets instead of just looking for the suffix "Tests".
@@ -86,11 +90,11 @@ def test_target
end

def application_targets
all_targets.reject { |t| t.name.end_with?('Tests') }
all_targets.reject { |t| t.name.end_with?(@test_target_name) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on t.name == @test_target_name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah, that makes more sense

@jakecraige
Copy link
Contributor

Would you be able to add a test covering this?

@gfontenot
Copy link
Member Author

I don't think so. This is so deep in the dumpster fire that is xcodeproj_helper.rb that I'm not sure how to get at this to test it.

@gfontenot
Copy link
Member Author

If you have ideas on how to test this though, I'm all ears.

@jakecraige
Copy link
Contributor

@gfontenot For a test I'd probably stub out the xcode_project method to return a stub of one and then test the 2 methods you modified work as expected.

@gfontenot
Copy link
Member Author

that sounds like so much work

fine

@jakecraige
Copy link
Contributor

carry on. private methods, le sigh.

@gfontenot
Copy link
Member Author

Opened #254 to try and fix this

@gfontenot gfontenot merged commit 64cc726 into master Nov 20, 2015
@gfontenot gfontenot deleted the gf-test-target branch November 20, 2015 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve detection of Test Targets
2 participants