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
Generate namespaced interactors/organizers in the right directory #9
Conversation
end | ||
end | ||
EOF | ||
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.
This test should be generating an organizer but it looks like a copy/paste of the interactor test.
|
||
path = "app/interactors/invoice/place_order.rb" | ||
check_file_presence([path], true) | ||
check_exact_file_content(path, <<-EOF) |
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.
<<-EOF.sub(/^\s{10}/, "")
(or whatever the right number of spaces is) and then indent the code below so it fits better.
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.
Yeah it looks like junk in the test but it also makes it clear exactly what the expected output is without concern over indentation. Active Support gives you String#strip_heredoc
but it's not available to us here. I'm comfortable leaving this as is.
rails g interactor foo/bar should generate app/interactors/foo/bar.rb
166d5e9
to
c7a1c53
Compare
Generate namespaced interactors/organizers in the right directory
Version 2.0.1 released! |
[Fixes #5]
rails g interactor foo/bar should generate app/interactors/foo/bar.rb
currently this generates
which is less than ideal, but follows how Rails does it