-
Notifications
You must be signed in to change notification settings - Fork 1
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
Features/password resets (controller) #43
Conversation
created initial PasswordResetsController and interactors. Specs currently red. Added password to User factory, this is duplicated in other branches.
end | ||
|
||
it "calls PasswordResetOrganizer" do | ||
expect(PasswordResetOrganizer).to receive(:call) |
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.
@enriikke why do we have to put the expect
before we create the http request here? I typically have to guess incorrectly once before figuring out the order on some of these 😀
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.
Haha, I usually break things before getting it right too! 😄
Think about the linguistic meaning in English. We are expecting something to receive. I interpret it as, the "something" hasn't received "it" yet but we expect that it will in the future. 😛
RSpec offers the counterpart matcher though, expect(...).to have_received(...)
. In that case you would do whatever it is that should send the method call to the object before the expectation.
Looks awesome @npauzenga !! |
@enriikke and the specs are green now (despite what CI tells you). Have a look at the |
@enriikke here are the initial specs for our password resets controller. I'll add a couple line notes but whatchya think?