Skip to content

Commit 1874f7c

Browse files
author
Franklin Webber
committed
README and Rakefile
1 parent d522434 commit 1874f7c

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Week 4
2+
3+
## Introduction
4+
5+
This week we take another step towards Test-Driven Development. Similar to how you were asked to make changes the Structs and OpenStructs to make the tests pass. Here again your job is to define the functionality of the methods that are described in the test suite.
6+
7+
### Outline
8+
9+
* Exercise
10+
11+
## Exercise
12+
13+
* Fork and clone this repository
14+
* Run Bundler
15+
* Run the tests / Setup Guard
16+
* Switch to the 'solutions' branch
17+
* Write the methods required to make the examples pass in `lib/quotes.rb`
18+
* Commit your changes to the 'solutions' branch
19+
* Push your 'solutions' branch up to Github
20+
21+
The exercise are laid out in the same way as before, however there are still some subtle differences so I implore you to read the following closely.
22+
23+
### Switch to the 'solutions' branch
24+
25+
Usually working on the *master* branch is acceptable behavior. However, there is a common workflow pattern to create a branch and to put work on that branch. Branching in git is easy.
26+
27+
Before you commit any changes that solve this week's exercise I want you to create a `solutions` branch.
28+
29+
#### Create the branch
30+
31+
$ git branch solutions
32+
33+
#### Move to that branch
34+
35+
$ git checkout solutions
36+
37+
### Write the methods required to make the examples pass in `lib/quotes.rb`
38+
39+
A difference from last week, is that you should define the methods in the `quotes.rb` file found within the `lib` directory. This is so the implementation of your methods are independent of test files.
40+
41+
That means you will will be writing code in `lib/quotes.rb` that will make the tests, specified in the `spec` directory, to pass.
42+
43+
### Commit your changes to the 'solutions' branch
44+
45+
When you created and switched to the `solutions` branch all work that you add and commit will automatically be added to the `solutions` branch.
46+
47+
### Push your 'solutions' branch up to Github
48+
49+
When you are ready to push your solutions to Github you will specify your new branch name.
50+
51+
$ git push origin solutions
52+
53+
This is nearly identical to the command you ran previously the exception being the word `master` is now replaced with 'solutions`.
54+

Rakefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
desc "`rake` will default to running `rake:spec`"
3+
task :default => :spec
4+
5+
desc "Run all the rspec examples"
6+
task :spec do
7+
system "bundle exec rspec -c spec/*_spec.rb"
8+
end

0 commit comments

Comments
 (0)