-
Notifications
You must be signed in to change notification settings - Fork 0
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
Resource recommendation #1
base: master
Are you sure you want to change the base?
Conversation
…he moments_keywords array
…tags before splitting moment keywords
@@ -0,0 +1,34 @@ | |||
describe MomentKeywords do | |||
subject(:moment) {FactoryBot.build(:moment, |
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.
This must be let
as it does not refer to the tested class (MomentKeywords
)
subject(:moment) {FactoryBot.build(:moment, | |
let(:moment) {FactoryBot.build(:moment, |
subject(:moment) {FactoryBot.build(:moment, | ||
categories: [build(:category, name: 'free', description: 'Description')], | ||
moods: [build(:mood, name: 'Name', description: 'Blog^^')], | ||
strategies: [build(:strategy, name: 'Name', description: 'books@!##.')], | ||
name: "ADDICTION", | ||
why: "self-care.", | ||
fix: "@Teachers!!" )} |
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.
The most accepted style for multiline blocks is using do...end
:
subject(:moment) {FactoryBot.build(:moment, | |
categories: [build(:category, name: 'free', description: 'Description')], | |
moods: [build(:mood, name: 'Name', description: 'Blog^^')], | |
strategies: [build(:strategy, name: 'Name', description: 'books@!##.')], | |
name: "ADDICTION", | |
why: "self-care.", | |
fix: "@Teachers!!" )} | |
subject(:moment) do | |
FactoryBot.build( | |
:moment, | |
categories: [build(:category, name: 'free', description: 'Description')], | |
moods: [build(:mood, name: 'Name', description: 'Blog^^')], | |
strategies: [build(:strategy, name: 'Name', description: 'books@!##.')], | |
name: "ADDICTION", | |
why: "self-care.", | |
fix: "@Teachers!!" | |
) | |
end |
why: "self-care.", | ||
fix: "@Teachers!!" )} | ||
|
||
let(:keywords) { MomentKeywords.new(moment).extract_moment_keywords } |
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.
It it refers to the class being testes (MomentKeywords
), this needs to be the subject
let(:keywords) { MomentKeywords.new(moment).extract_moment_keywords } | |
subject(:keywords) { MomentKeywords.new(moment).extract_moment_keywords } |
@@ -0,0 +1,22 @@ | |||
describe ResourceRecommendation do | |||
subject(:moment) {FactoryBot.build(:moment, |
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.
subject(:moment) {FactoryBot.build(:moment, | |
let(:moment) {FactoryBot.build(:moment, |
why: 'text', | ||
fix: 'text' )} | ||
|
||
let(:resources) { ResourceRecommendation.new(moment).resources} |
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.
let(:resources) { ResourceRecommendation.new(moment).resources} | |
subject(:resources) { ResourceRecommendation.new(moment).resources} |
end | ||
|
||
|
||
|
||
|
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.
These extra empty lines must be removed
It looks good! 👍 Almost there |
Description
More Details
Corresponding Issue
Screenshots
Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!