- Fork this repository, then clone it to your local machine so you can begin work.
- Create an acceptance test for:
- being on the index (
'/'
) page - viewing the text "< your name > is a student at Craft Academy"
- being on the index (
- Run your test and define the steps needed to actually test these actions.
- Make your first test pass. (Hint: you will need an action in the controller.)
- Make your second test pass. (Requirement: You must pass your name as a variable into a view. You may not simply print text from the controller.)
- Create two new tests:
- Visit
'/name/Amber'
- Create a new User with a name that comes from
:name
. (Hint::name
is stored in "params". Your url should look like/name/:name
) More hints:- Your new acceptance test should look something like:
When I visit the name page for "Amber" Then I should create a new user with name "Amber"
- Visit
- You should quickly hit a block with an error like
The attribute 'name' is not accessible in User
. This requires us to move into unit testing. Write a unit (spec) test for creating a User with a name. (Hint: there is already one unit test. You will need a second.) - Make your unit test pass.
- Try cucumber again - is your acceptance test passing?
- Create a Pull Request with your solution.
-
Notifications
You must be signed in to change notification settings - Fork 28
CraftAcademy/week4-assessment
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published