- Test Fixtures: setup and teardown
- Test Case: unit of testing
- Test Suite: group of test and/or suites
- Test Runner: orchestrates execution of tests
methods, functions name must start with test (default)
First, make sure you're at the home directory by typing cd
.
Next, type nano .bash_profile
. Copy and paste this into the window:
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
In student projects, I commonly look at contribution graphs to see how much code they worked on, to get an idea if one student is doing more work than others on the project. This can be used for coaching and performance grading.
Start with your ~/.gitconfig
file in your home folder. Add these lines:
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
let
and const
statements. For the purposes of the React documentation, you can consider them equivalent to var
.class
keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this
in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav| NAME | PATH | HTTP VERB | PURPOSE | | |
|----------|----------------|-----------------|--------------------------------------| | |
| Index | /blog | GET | Displays all blog post | | |
| New | /blog/new | GET | Shows new form for new blog entry | | |
| Create | /blog | POST | Creates a new blog post | | |
| Show | /blog/:id | GET | Shows one specified blog post | | |
| Edit | /blog/:id/edit | GET | Shows edit form for one blog post | | |
| Update | /blog/:id | PUT | Updates a particular blog post | | |
| Destroy | /blog/:id | DELETE | Deletes a particular blog post | |
class Bob | |
def respond_to(input) | |
@input = input.strip | |
return "Fine. Be that way!" if silence? | |
return "Whoa, chill out!" if shouting? | |
return "Sure." if question? | |
"Whatever." | |
end |
class Bob | |
def reply_to(statement) | |
public_send("reply_to_#{statement.class}".downcase.to_sym) | |
rescue NoMethodError | |
default_reply | |
end | |
def reply_to_silence | |
"Fine. Be that way!" | |
end |