Skip to content

Instantly share code, notes, and snippets.

@zetter
Last active August 29, 2015 14:03
Show Gist options
  • Save zetter/7bc12490cc4218d5f525 to your computer and use it in GitHub Desktop.
Save zetter/7bc12490cc4218d5f525 to your computer and use it in GitHub Desktop.
Enrolment rspec feature spec
feature 'Enrolment' do
scenario 'Enrolling in a course' do
course = FactoryGirl.create(:course)
learner = FactoryGirl.create(:learner)
login_as learner
visit course_path(course)
find('.join').click
expect(page).to have_content('Thanks for joining!')
visit '/'
expect(page).to have_main_header('My Courses')
expect(page).to have_content(course.full_title)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment