README.markdown in snapdragon-0.1.6 vs README.markdown in snapdragon-0.1.7

- old
+ new

@@ -4,19 +4,25 @@ ## Installation Add this line to your application's Gemfile: - gem 'snapdragon' +``` +gem 'snapdragon' +``` And then execute: - $ bundle +```text +$ bundle +``` Or install it yourself as: - $ gem install snapdragon +```text +$ gem install snapdragon +``` ## Install PhantomJS You need at least [PhantomJS](http://phantomjs.org) 1.8.1. There are no other external dependencies (you don't need Qt, or a running X server, etc.) @@ -26,11 +32,13 @@ I recommend installing [PhantomJS](http://phantomjs.org/) using [Homebrew](http://mxcl.github.io/homebrew/) on Mac OS X. Using [Homebrew](http://mxcl.github.io/homebrew/) it can be installed as easily as running the following command: - $ brew install phantomjs +```text +$ brew install phantomjs +``` ## Quick Start Guide If you are a visual learner Brian Miller and I have put together a Free [Snapdragon](http://github.com/reachlocal/snapdragon) Screencast at [The Code @@ -103,31 +111,35 @@ #### Run a specific describe/it block The following runs the describe or it block that corresponds to line number *23* in the *spec/javascript/foo_spec.js* file. +```text +$ snapdragon spec/javascript/foo_spec.js:23 ``` -snapdragon spec/javascript/foo_spec.js:23 -``` #### Run an entire spec file(s) +```text +$ snapdragon spec/javascript/foo_spec.js spec/javascript/bar_spec.js ``` -snapdragon spec/javascript/foo_spec.js spec/javascript/bar_spec.js -``` #### Run an entire directory of spec files +The following recursively explores the given directories contents for +files that end in `spec.js` or `Spec.js` and runs the tests in the identified +spec files. + +```text +$ snapdragon spec/javascripts ``` -snapdragon spec/javascripts -``` #### Run combination of files and directories +```text +$ snapdragon spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js ``` -snapdragon spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js -``` ## Usage (snapdragon_server) The *snapdragon_server* command allows you to run your [Jasmine](http://pivotal.github.io/jasmine/) specs in your browser. When this @@ -135,25 +147,38 @@ browser to the proper URL to run your specified test suite. This is especially useful if you want to debug some JavaScript as your browser most likely has a JavaScript debugger built into it. A few examples of this commands usage follow. +#### Run a specific describe/it block + +The following runs the describe or it block that corresponds to line number +*23* in the *spec/javascript/foo_spec.js* file. + +```text +$ snapdragon_server spec/javascript/foo_spec.js:23 +``` + #### Run specific spec files +```text +$ snapdragon_server spec/javascript/foo_spec.js spec/javascript/bar_spec.js ``` -snapdragon_server spec/javascript/foo_spec.js spec/javascript/bar_spec.js -``` #### Run all the specs in directories +The following recursively explores the given directories contents for +files that end in `spec.js` or `Spec.js` and runs the tests in the identified +spec files. + +```text +$ snapdragon_server spec/javascript custom_js/specs ``` -snapdragon_server spec/javascript custom_js/specs -``` #### Combine files and directories -``` -snapdragon_server spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js +```text +$ snapdragon_server spec/javascript custom_js/tests/foo_spec.js custom_js/test/bar_spec.js ``` ## // require_relative() directive Snapdragon also provides a `// require_relative()` directive that the