- create a folder withon the 'spec' folder called 'features'
- In the 'features' folder create a file 'creating_homepage_spec.rb'
In the Guardfile we have the following line:
watch(rails.view_dirs) { |m| "spec/features/#{m[1]}" } This line tells us that when the files in the app/views folder change, we want to run the specs in 'spec/features/' folder, where is the subfolder under views in which the file changed. So if you modify a file in app/views/articles, our will be 'articles'.
We are doing this because we don't want to run specs unrelated to the view being modified.
- User to sign in
- Upon successful sign in, user can click on a link to "My lounge" to go to an area that shows details of her/his workouts
- User can then click another link (to be styled as a button)
- User can fill out a for, with the details of workout
- Alternatively, user can click on a link to go back to the lounge
Excercise facts:
- Has a duration in minutes
- Working details (essentially a description of the activity)
- Date of the activity
- Can only exists in the content of a usre (execise must be owned by a user)
Exercise expectations upon creation:
- The new excercise's user_id has to be the same as the logged in user's
- The current page should be the excercise's show page
- Flash message is displayed upon unsuccessful creation of an exercise
- Ensure that duration_in_min is a number
- Workout details field is required
- Activity date is required