Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Setup the database for your application (development and test environments):
`bin/rake db:setup`
`bin/rake db:test:prepare`

*Optional: use [guard](#improve-your-workflow-with-automated-rspec-running) in order to improve your workflow*

### Issues to solve:

Expand Down Expand Up @@ -72,6 +73,47 @@ Setup the database for your application (development and test environments):
* [http://guides.rubyonrails.org/](http://guides.rubyonrails.org/) - sooner or later this one will come in handy
* not feeling comfortable with JavaScript / jQuery? CodeSchool can help you with this one too - [http://www.codeschool.com/courses/try-jquery](http://www.codeschool.com/courses/try-jquery)


### Improve your workflow with automated rspec running

Technically, they way how you will be completing part of this app is called [Test-driven development (TDD)](http://stackoverflow.com/questions/11941/getting-started-with-agile-and-tdd). I found using [guard gem](https://github.com/guard/guard) in this programming methodology is very helpful. If you aren't familiar with TDD concept yet let me explain this in few words.

Idea of this programming methodology is to first write a test and then write a piece of code that will make this test pass :green_heart:.

In `Workshops` app tests are already written. The 'only' thing you need to do is to make these tests pass and eventually add your own for custom behaviour of app (and also make them pass!).

To make this process more friendly I would recommend you use [guard-rspec gem](https://github.com/guard/guard-rspec). How does it work?

It's very simple. By default Guard (with `rspec` addon) watches files in your working folder and when you make any change to them (add piece of code, remove file, etc.) it runs test so you can track your progress all the time without running `rspec` command anymore!

It saves a lot of the time, help to track current and further tasks and what is more, if your new piece of code will destroy (bug :exlamation:) any behaviour in app you will get notified about it immediately. As sooner you can react on bug as easier it is to remove this bug.

How to start?

1. Open new tab/window of console/terminal/cmd that will be dedicated for guard runner.
2. Go to `Workshops` directory and run `guard init rspec`

You should see in console:

```
21:02:07 - INFO - Writing new Guardfile to /path_where_you_cloned_this_repo/workshops/Guardfile
21:02:07 - INFO - rspec guard added to Guardfile, feel free to edit it
```

3. Run `guard` command. Now this console/terminal/cmd tab will watch all files in project's directory untill you terminate it (`control+c on OS X`). You should see this console output:

```
21:02:18 - INFO - Guard is using TerminalTitle to send notifications.
21:02:18 - INFO - Guard::RSpec is running
21:02:18 - INFO - Guard is now watching at '/path_where_you_cloned_this_repo/workshops'
```

4. Go write some code and get notified about your progress on live with guard!

You can also modify default behaviour of guard! For further read visit [guard-rspec repo](https://github.com/guard/guard-rspec) and/or [guard repo](https://github.com/guard/guard).

Also if you want to take full adventage of `Rails 4.1` you should consider using `spring` with `RSpec`. Further reading [here](http://girders.org/blog/2014/02/06/setup-rails-41-spring-rspec-and-guard/)

## Good Luck!

**Psst! Do not hesitate to ask your questions on [hipchat](https://www.hipchat.com/gElgOYCSJ)**
Expand Down