Skip to content

Conversation

@robskrob
Copy link

  1. there's a source code problem with the spec/model/user.rb. The following code:
    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.

  1. 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.

  2. 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....

  3. 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.

  4. 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.

Rob Jewell added 30 commits April 16, 2014 12:58
…ssfully adds a delayed job process for invitations conroller and tests
…uous test in relationships controller test suite
… 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants