Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 66 lines (38 sloc) 2.639 kB
1874f7c @burtlo README and Rakefile
burtlo authored
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
75c11b6 @burtlo Bonus Updated with method file
burtlo authored
9 #### Exercise
10
11 * Fork and clone this repository
12 * Fix the tests on a branch
13 * Push your changes to Github on that branch
14
15 #### Reading
16
17 * [Git Branching](http://progit.org/book/ch3-0.html)
18 * [Methods](http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls)
19 * [Methods](http://ruby-doc.org/docs/ProgrammingRuby/html/tut_methods.html)
20 * [Enumerable](http://blog.jayfields.com/2008/03/ruby-inject.html)
1874f7c @burtlo README and Rakefile
burtlo authored
21
22 ## Exercise
23
75c11b6 @burtlo Bonus Updated with method file
burtlo authored
24 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.
25
1874f7c @burtlo README and Rakefile
burtlo authored
26 * Fork and clone this repository
27 * Run Bundler
28 * Run the tests / Setup Guard
29 * Switch to the 'solutions' branch
b779767 @burtlo Updated the README to be correct about where to do your work
burtlo authored
30 * Write the methods required to make the examples pass in each of the associated files in the lib directory.
1874f7c @burtlo README and Rakefile
burtlo authored
31 * Commit your changes to the 'solutions' branch
32 * Push your 'solutions' branch up to Github
33
34 ### Switch to the 'solutions' branch
35
36 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.
37
38 Before you commit any changes that solve this week's exercise I want you to create a `solutions` branch.
39
40 #### Create the branch
41
42 $ git branch solutions
43
44 #### Move to that branch
45
46 $ git checkout solutions
47
b779767 @burtlo Updated the README to be correct about where to do your work
burtlo authored
48 ### Write the methods required to make the examples pass in each of the associated files in the lib directory
1874f7c @burtlo README and Rakefile
burtlo authored
49
b779767 @burtlo Updated the README to be correct about where to do your work
burtlo authored
50 A difference from last week, is that you should define the methods in the `lib` folder in the file that matches the name of spec folder. This is so the implementation of your methods are independent of test files.
1874f7c @burtlo README and Rakefile
burtlo authored
51
b779767 @burtlo Updated the README to be correct about where to do your work
burtlo authored
52 That means you will will be writing code that fixes the `find_quote_spec.rb` in `lib/find_quote.rb`. Fix the `display_superheroes_spec.rb` in `display_superheroes.rb` ...
1874f7c @burtlo README and Rakefile
burtlo authored
53
54 ### Commit your changes to the 'solutions' branch
55
56 When you created and switched to the `solutions` branch all work that you add and commit will automatically be added to the `solutions` branch.
57
58 ### Push your 'solutions' branch up to Github
59
60 When you are ready to push your solutions to Github you will specify your new branch name.
61
62 $ git push origin solutions
63
64 This is nearly identical to the command you ran previously the exception being the word `master` is now replaced with 'solutions`.
65
Something went wrong with that request. Please try again.