updates and fixes for liquid 2.2.2
This commit is contained in:
parent
cb0f8b816e
commit
212397dc9e
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
.sass-cache/
|
||||
_site/
|
||||
.idea/*
|
||||
.jhw-cache/
|
||||
ext/
|
||||
pkg/
|
||||
|
||||
|
76
Gemfile.lock
76
Gemfile.lock
@ -1,60 +1,30 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
jasmine-headless-webkit (0.1.1)
|
||||
coffee-script
|
||||
jasmine
|
||||
rainbow
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
ZenTest (4.5.0)
|
||||
autotest (4.4.6)
|
||||
ZenTest (>= 4.4.1)
|
||||
childprocess (0.1.8)
|
||||
ffi (~> 1.0.6)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.1.0)
|
||||
diff-lcs (1.1.2)
|
||||
execjs (0.3.3)
|
||||
multi_json (~> 1.0)
|
||||
fakefs (0.3.2)
|
||||
ffi (1.0.7)
|
||||
rake (>= 0.8.7)
|
||||
jasmine (1.0.2.0)
|
||||
coffee-script-source
|
||||
json_pure (>= 1.4.3)
|
||||
rack (>= 1.1)
|
||||
rspec (>= 1.3.1)
|
||||
selenium-webdriver (>= 0.1.3)
|
||||
json_pure (1.5.1)
|
||||
multi_json (1.0.1)
|
||||
rack (1.2.2)
|
||||
rainbow (1.1.1)
|
||||
rake (0.8.7)
|
||||
rspec (2.5.0)
|
||||
rspec-core (~> 2.5.0)
|
||||
rspec-expectations (~> 2.5.0)
|
||||
rspec-mocks (~> 2.5.0)
|
||||
rspec-core (2.5.1)
|
||||
rspec-expectations (2.5.0)
|
||||
diff-lcs (~> 1.1.2)
|
||||
rspec-mocks (2.5.0)
|
||||
rubyzip (0.9.4)
|
||||
selenium-webdriver (0.2.0)
|
||||
childprocess (>= 0.1.7)
|
||||
ffi (>= 1.0.7)
|
||||
json_pure
|
||||
rubyzip
|
||||
albino (1.3.3)
|
||||
posix-spawn (>= 0.3.6)
|
||||
classifier (1.3.3)
|
||||
fast-stemmer (>= 1.0.0)
|
||||
directory_watcher (1.4.1)
|
||||
fast-stemmer (1.0.0)
|
||||
jekyll (0.11.0)
|
||||
albino (>= 1.3.2)
|
||||
classifier (>= 1.3.1)
|
||||
directory_watcher (>= 1.1.1)
|
||||
kramdown (>= 0.13.2)
|
||||
liquid (>= 1.9.0)
|
||||
maruku (>= 0.5.9)
|
||||
kramdown (0.13.3)
|
||||
liquid (2.2.2)
|
||||
maruku (0.6.0)
|
||||
syntax (>= 1.0.0)
|
||||
posix-spawn (0.3.6)
|
||||
redcarpet (1.17.2)
|
||||
syntax (1.0.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
autotest
|
||||
fakefs
|
||||
jasmine-headless-webkit!
|
||||
rspec
|
||||
jekyll
|
||||
liquid (= 2.2.2)
|
||||
redcarpet
|
||||
|
@ -1,4 +1,4 @@
|
||||
markdown: rdiscount
|
||||
markdown: redcarpet
|
||||
auto: true
|
||||
server: true
|
||||
pygments: true
|
||||
|
30
index.md
30
index.md
@ -225,6 +225,20 @@ If you need to test server interaction, do one of the following:
|
||||
* Stub your server responses using [Sinon.JS](http://sinonjs.org/), the recommended way.
|
||||
* Use [PhantomJS](http://www.phantomjs.org/) against a running copy of a Jasmine server, instead of this project.
|
||||
|
||||
#### Vendored JavaScript support
|
||||
|
||||
_(still in development!)_
|
||||
|
||||
You can pull in vendored JavaScript files as helpers in your setup! Add the `vendored_helpers` section to your `jasmine.yml` file
|
||||
with the names of some helpers you want to use (take a look at [jasmine-spec-extras](https://github.com/johnbintz/jasmine-spec-extras) to see how it works):
|
||||
|
||||
{% highlight yaml %}
|
||||
vendored_helpers:
|
||||
- 'sinon'
|
||||
{% endhighlight %}
|
||||
|
||||
_This is the first step in an effort to intergrate with Sprockets directly to make testing modern Rails apps as seamless as possible. Oh yeah, it's coming!_
|
||||
|
||||
#### What else works?
|
||||
|
||||
`alert()` and `confirm()` work, though the latter always returns `true`. You should be mocking calls to `confirm()`,
|
||||
@ -244,6 +258,9 @@ spyOn(window, 'confirm').andReturn(false)
|
||||
|
||||
If you need a heavy-weight object printer, you also have `console.pp()`, which uses Jasmine's built-in pretty-printer if available, and falls back to `JSON.stringify()` if it's not.
|
||||
|
||||
You also get an additional method, `console.peek()`, which calls `console.log()` with the provided parameter, then passes the parameter back along so you
|
||||
can continue to work with it. It's the equivalent of `.tap { |o| p o }` in Ruby.
|
||||
|
||||
## Running the runner
|
||||
|
||||
{% highlight bash %}
|
||||
@ -253,6 +270,7 @@ jasmine-headless-webkit [ -c / --colors ]
|
||||
[ --keep ]
|
||||
[ -l / --list ]
|
||||
[ --report <report file> ]
|
||||
[ --runner-out <html file> ]
|
||||
[ -j / --jasmine-config <path to jasmine.yml> ]
|
||||
<spec files to run>
|
||||
{% endhighlight %}
|
||||
@ -332,6 +350,18 @@ valuable seconds off of testing with every run, saving you enough time every day
|
||||
|
||||
If you don't want this behavior, pass in `--no-full-run` and filtered runs will be the only thing that runs when you request one.
|
||||
|
||||
### Writing the HTML runner to another location
|
||||
|
||||
If you want to use the runner file in other places, use the `--runner-out` parameter with the name of the target file.
|
||||
The HTML produced uses the Jasmine `HtmlReporter` if not loaded in `jasmine-headless-webkit`, so you should be able
|
||||
to just open it in a browser and have it work.
|
||||
|
||||
If you always want the reporter written to a particular location, you can define that location in `jasmine.yml`:
|
||||
|
||||
{% highlight yaml %}
|
||||
runner_output: "runner.html"
|
||||
{% endhighlight %}
|
||||
|
||||
## Running the runner from a Ruby program
|
||||
|
||||
You can call the runner from Ruby:
|
||||
|
Loading…
Reference in New Issue
Block a user