Giter Club home page Giter Club logo

week4-assessment's Introduction

Acceptance - Unit Test Cycle

  1. Fork this repository, then clone it to your local machine so you can begin work.
  2. Create an acceptance test for:
    1. being on the index ('/') page
    2. viewing the text "< your name > is a student at Craft Academy"
  3. Run your test and define the steps needed to actually test these actions.
  4. Make your first test pass. (Hint: you will need an action in the controller.)
  5. 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.)
  6. Create two new tests:
    1. Visit '/name/Amber'
    2. 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"
      
  7. 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.)
  8. Make your unit test pass.
  9. Try cucumber again - is your acceptance test passing?
  10. Create a Pull Request with your solution.

week4-assessment's People

Contributors

amberwilkie avatar diraulo avatar marizaswart avatar tochman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.