{"comment":{"url":"https://api.github.com/repos/education/classroom/comments/17034326","html_url":"https://github.com/education/classroom/commit/74755237d1fafdb55c5951a6e2475602acdf110c#commitcomment-17034326","id":17034326,"user":{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false},"position":23,"line":59,"path":"spec/models/assignment_repo_spec.rb","commit_id":"74755237d1fafdb55c5951a6e2475602acdf110c","created_at":"2016-04-09T02:18:57Z","updated_at":"2016-04-09T02:18:57Z","body":"OK. The main thing I had struggled with was that my after create was [conditional on `assignment.copy_open_issues?`](https://github.com/education/classroom/blob/74755237d1fafdb55c5951a6e2475602acdf110c/app/models/assignment_repo.rb#L27) so the `assignment` used in:\r\n```ruby\r\nbefore(:each) do\r\n  @assignment_repo = AssignmentRepo.create(assignment: assignment, user: student)\r\nend\r\n```\r\nwould check the `copy_open_issues? == false` case, but I'd need a different assignment than the one used in that `before_each` to test the `copy_open_issues? == true` case, and I wasn't sure how to do that."}}