Skip to content

Instantly share code, notes, and snippets.

@bdougie
Created August 13, 2015 23:17
Show Gist options
  • Select an option

  • Save bdougie/1141581a30ae56000975 to your computer and use it in GitHub Desktop.

Select an option

Save bdougie/1141581a30ae56000975 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe CheckingFeedbackEligibility do
context 'a student who has enrolled in only one course' do
let!(:student) { create(:active_student) }
let(:enrollment) { student.enrollment }
it 'has their enrollment included in an upcoming enrollment' do
Timecop.travel(enrollment.course_end_date - 7.weeks)
result = CheckingFeedbackEligibility.new(enrollment,
Feedback.upcoming_thursday).eligible?
expect(result).to be(true)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment