-
-
Notifications
You must be signed in to change notification settings - Fork 70
Add specs to partner requests controllers #175
Add specs to partner requests controllers #175
Conversation
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.
Thanks for this contribution @cassianoblonski! I really appreciate it! 😄 I have some notes that are mostly personal preference. I know that much of this was copied over from the old controller_spec that these were ported from. I certainly wont consider it a blocker to merging.
@@ -0,0 +1 @@ | |||
ruby 2.6.2 |
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.
I know this is for asdf
version manager, but can't the asdf ruby plugin not use the same .ruby-version
standard as rbenv
, chruby
, and rvm
?
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.
I don't think so, I tried searching this right now and didn't found a way. I don't like this either makes the root project folder kind of dirt with so many version manager files, but its good for obvious reasons, so we remove this file or keep it?
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.
I dont really have a preference, just thought that we could avoid it, but id rather asdf
users have a positive experience setting up the app.
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.
Looks like there is a configuration flag you can set on your .asdfrc
|
||
RSpec.describe "Partner Requests Controller", type: :request do | ||
context "when user authenticated" do | ||
let!(:partner) { create(:partner, :verified) } |
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.
I tend to avoid the usage of let
blocks in my rspec tests.
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.
Once I get home, I’m going to check this blog post, thx for the tip I really appreciate your sharing.
let!(:partner) { create(:partner, :verified) } | ||
let!(:user) { create(:user, partner: partner) } | ||
|
||
before do |
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.
I prefer to avoid before
blocks like this for the same reasons that I like to avoid let
Resolves #149
Description
Migrated the file partner_requests_controller_spec to spec/requests/partner_requests_spec, then added some new specs to improve coverage
Type of change
How Has This Been Tested?
Running all RSpec tests.