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

throwAssertion does not work on macOS #1110

Closed
1 task done
yuri-qualtie opened this issue Dec 25, 2023 · 2 comments · Fixed by #1111
Closed
1 task done

throwAssertion does not work on macOS #1110

yuri-qualtie opened this issue Dec 25, 2023 · 2 comments · Fixed by #1111

Comments

@yuri-qualtie
Copy link

yuri-qualtie commented Dec 25, 2023

  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

We run following spec for macOS platform:

                it("should NOT be called") {
                    expect(subject.removeAccounts()).to(throwAssertion())
                }

Note: subject.removeAccounts does assertionFailure("should not be called")

What did you expect to happen?

Spec is passed.
BTW, we see this behavior in Nimble 13.0.0

What actually happened instead?

Spec is crashed.
Console has message

Note: throwAssertion no longer works on tvOS or watchOS platforms when you use Nimble with Cocoapods.
      You will have to use Nimble with Swift Package Manager or Carthage.

It looks like arch or canImport is incorrectly resolved in ThrowAssertion.swift

Environment

List the software versions you're using:

  • Quick: 7.3.0
  • Nimble: 13.1.1
  • Xcode Version: Version 15.0.1 (15A507) (Open Xcode; In menubar: Xcode > About Xcode)
  • Swift Version: Default (Open Xcode Preferences; Components > Toolchains. If none, use Xcode Default.)
  • MacOS: 14.1.2.

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Cocoapods: 1.14.3 (Use pod --version in Terminal)
@svenmuennich
Copy link
Contributor

I noticed the same behavior and narrowed it down to a missing dependency. #1111 fixes this.

@younata
Copy link
Member

younata commented Jan 5, 2024

This should be fixed in v13.1.2!

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 a pull request may close this issue.

3 participants