-
Notifications
You must be signed in to change notification settings - Fork 111
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
Feature specs capybara -- finishes week 3 #79
Open
robskrob
wants to merge
206
commits into
gotealeaf:master
Choose a base branch
from
robskrob:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ssfully adds a delayed job process for invitations conroller and tests
…uous test in relationships controller test suite
…missions in controllers
… to take an object's id for sidekiq optimization
…n the users controller and invitations controller fails
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
it { should have_many(:queue_items).order(:position) }
will create an error if the object type of the argument passed in to, .order, does not match the method's argument in the user model: has_many :queue_items, -> { order('position') }
String vs Symbol...Symbol vs String -- Kevin as well as the rest of the class dived deep into thoughtbot's shoulda matchers and were unclear as to whether the problem belonged to the gem or to rails source code.
in my spec/features/user_interacts_with_queue_spec, I put all of the methods that abstract away the code on top of the file. I don't know if that was the right decision.
for, describe "POST create", in spec/controllers/queue_items_controller_spec, I had to comment out, let(:current_user) {Fabricate(:user)}, because it was producing multiple user objects in my spec. I don't know why or how this is possible. Also without this let command, I have no idea how users are entering my spec or from where. Any help in shedding some light on this would be great. I suspect my macro I use in the before do block is to blame -- but that puzzles me because i thought variables in the before do block lose their meaning once outside this blocks scope....
I also implemented the queued_item? method in the user.rb file differently than Kevin. I kept on running into ActiveRecord::Associations::CollectionProxy::ActiveRecord_Associations_CollectionProxy_QueueItem:0x007ff7f6bd27e8
when I followed his method, which -- funny enough -- I believe was to blame for the source code problem in item number one. Everything seemed to boil down to a relation between objects that either the gem could not handle or that rails source code did not articulate well enough.
I have a bunch of commented out code in my, spec/features/user_interacts_with_queue_spec, because I was tracking what Kevin was doing in the solutions and trying out each execution of the functioning code. I'm still not too sure if I understand the commented out code, but I definitely understand the implementation code I went with.