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

Unknown attribute 'MockObservable' #109

Closed
kuritatu18 opened this issue Apr 28, 2020 · 5 comments
Closed

Unknown attribute 'MockObservable' #109

kuritatu18 opened this issue Apr 28, 2020 · 5 comments

Comments

@kuritatu18
Copy link

The protocol contains Observable and generates a mock that gives an error. mockolo is installed with mint. Is there a way to resolve this situation?

  • protocol
@mockable
protocol SampleProtocol {
    var foo: Observable<String> { get }
}
  • mock
var fooSubjectSetCallCount: Int { return self._foo.callCount }
var fooSubject: PublishSubject<String> { return self._foo.publishSubject }
var fooReplaySubject: ReplaySubject<String> { return self._foo.replaySubject }
var fooBehaviorSubject: BehaviorSubject<String> { return self._foo.behaviorSubject }
@MockObservable(unwrapped: Observable<String>.empty()) var foo: Observable<String>  /// Unknown attribute 'MockObservable'
@akkyie
Copy link
Contributor

akkyie commented May 6, 2020

Same here. We were able to use Mockolo without any dependency before (until 1.2.0 I think?) but now we need import MockObservable to compile its output.
I think we should import MockoloFramework to get it running, however we have to copy the source code directly to our project since it's not available on iOS ☹️

Does it have any plan to work without a runtime library by emitting support types along with mocks, or divide them into a lightweight library which works on other platforms than macOS?

@elsh
Copy link
Contributor

elsh commented May 14, 2020

Sorry for the delay. Will resolve this asap.

@elsh
Copy link
Contributor

elsh commented May 14, 2020

Resolved https://github.com/uber/mockolo/releases/tag/1.2.2

Please close once it's verified. Thanks.

@elsh
Copy link
Contributor

elsh commented May 14, 2020

Feel free to reopen if it's still unresolved.

@elsh elsh closed this as completed May 14, 2020
@bezoadam
Copy link

I still have same problem with version 1.2.4 and don't know how to resolve it.

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

No branches or pull requests

4 participants