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

Features/password resets (controller) #43

Merged
merged 8 commits into from
Jan 5, 2016
Merged

Conversation

npauzenga
Copy link
Owner

@enriikke here are the initial specs for our password resets controller. I'll add a couple line notes but whatchya think?

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)
Copy link
Owner Author

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 😀

Copy link
Collaborator

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.

@enriikke
Copy link
Collaborator

Looks awesome @npauzenga !! :shipit: 🐑

@npauzenga npauzenga changed the title Features/password resets Features/password resets (controller) Jan 2, 2016
@npauzenga
Copy link
Owner Author

@enriikke and the specs are green now (despite what CI tells you). Have a look at the password_resets_controller!

@npauzenga npauzenga merged commit 24420ee into staging Jan 5, 2016
@npauzenga npauzenga deleted the features/password-resets branch January 5, 2016 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants