collectiveidea / interactor

Interactor provides a common interface for performing complex user interactions.
MIT License
3.36k stars 212 forks source link

Before block code does not get called #69

Closed kapso closed 10 years ago

kapso commented 10 years ago

When interactor is invoked using the following (the invocation is suggested by the rspec example), before block doesnt get called.

interactor = AuthenticateUser.new(params)
interactor.call
ersatzryan commented 10 years ago

The public API for interactors is to use the class method call, in our rspec example we are demonstrating how to test the call method in isolation. If you want to test the overall effect of an interactor just use AuthenticateUser.call(params) in your test.