add a bunch of pretty stuff
This commit is contained in:
parent
0855209023
commit
4d26b3c821
49
index.md
49
index.md
@ -93,6 +93,38 @@ does not support out of the box. Once there's official support, you'll be able t
|
||||
and the Jasmine test server when you're using CoffeeScript. CoffeeScript files are compiled and injected into the generated HTML
|
||||
files.
|
||||
|
||||
Never done Jasmine in CoffeeScript? It looks like this:
|
||||
|
||||
{% highlight coffeescript %}
|
||||
describe 'Component', ->
|
||||
describe 'StorylineNode', ->
|
||||
model = null
|
||||
|
||||
beforeEach ->
|
||||
model = new ComponentStorylineNode({id: 1})
|
||||
|
||||
it 'should not be new', ->
|
||||
expect(model.isNew()).toEqual(false)
|
||||
{% endhighlight %}
|
||||
|
||||
...and it turns into this...
|
||||
|
||||
{% highlight js %}
|
||||
describe('Component', function() {
|
||||
return describe('StorylineNode', function() {
|
||||
var model;
|
||||
model = null;
|
||||
beforeEach(function() {
|
||||
return model = new ComponentStorylineNode({
|
||||
id: 1
|
||||
});
|
||||
});
|
||||
return it('should not be new', function() {
|
||||
return expect(model.isNew()).toEqual(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
{% endhighlight %}
|
||||
#### Server interaction
|
||||
|
||||
Since there's no Jasmine server running, there's no way to grab test files from the filesystem via Ajax.
|
||||
@ -192,6 +224,23 @@ Jasmine::Headless::Task.new('jasmine:headless') do |t|
|
||||
end
|
||||
{% endhighlight %}
|
||||
|
||||
If you've bundled `jasmine-headless-webkit` in with Rails, you'll also get a basic task for running your
|
||||
Jasmine specs. Be sure to include the gem in the development group so you get with a normal call to `rake -T`:
|
||||
|
||||
{% highlight ruby %}
|
||||
group :test, :development do
|
||||
gem 'jasmine-headless-webkit'
|
||||
end
|
||||
{% endhighlight %}
|
||||
|
||||
<pre>
|
||||
# rake -T
|
||||
|
||||
rake jasmine:headless # Run Jasmine specs headlessly
|
||||
</pre>
|
||||
|
||||
This is the same as running `jasmine-headless-webkit -c`.
|
||||
|
||||
## I have a problem or helpful suggestion, good sir.
|
||||
|
||||
Here's what you can do:
|
||||
|
@ -77,12 +77,12 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.js, .ruby {
|
||||
.js, .ruby, .coffeescript {
|
||||
.nx {
|
||||
color: $indicator-code-color;
|
||||
}
|
||||
|
||||
.s1 {
|
||||
.s1, .ss {
|
||||
color: $scalar-code-color;
|
||||
}
|
||||
|
||||
|
@ -89,26 +89,26 @@ body #container #inner-container .yaml .p-Indicator {
|
||||
color: #78a39d;
|
||||
}
|
||||
/* line 81, ../sass/screen.scss */
|
||||
body #container #inner-container .js .nx, body #container #inner-container .ruby .nx {
|
||||
body #container #inner-container .js .nx, body #container #inner-container .ruby .nx, body #container #inner-container .coffeescript .nx {
|
||||
color: #78a39d;
|
||||
}
|
||||
/* line 85, ../sass/screen.scss */
|
||||
body #container #inner-container .js .s1, body #container #inner-container .ruby .s1 {
|
||||
body #container #inner-container .js .s1, body #container #inner-container .js .ss, body #container #inner-container .ruby .s1, body #container #inner-container .ruby .ss, body #container #inner-container .coffeescript .s1, body #container #inner-container .coffeescript .ss {
|
||||
color: #e68917;
|
||||
}
|
||||
/* line 89, ../sass/screen.scss */
|
||||
body #container #inner-container .js .nb, body #container #inner-container .ruby .nb {
|
||||
body #container #inner-container .js .nb, body #container #inner-container .ruby .nb, body #container #inner-container .coffeescript .nb {
|
||||
color: #abb592;
|
||||
}
|
||||
/* line 93, ../sass/screen.scss */
|
||||
body #container #inner-container .js .kc, body #container #inner-container .js .kp, body #container #inner-container .ruby .kc, body #container #inner-container .ruby .kp {
|
||||
body #container #inner-container .js .kc, body #container #inner-container .js .kp, body #container #inner-container .ruby .kc, body #container #inner-container .ruby .kp, body #container #inner-container .coffeescript .kc, body #container #inner-container .coffeescript .kp {
|
||||
color: #a7b585;
|
||||
}
|
||||
/* line 97, ../sass/screen.scss */
|
||||
body #container #inner-container .js .no, body #container #inner-container .ruby .no {
|
||||
body #container #inner-container .js .no, body #container #inner-container .ruby .no, body #container #inner-container .coffeescript .no {
|
||||
color: #de1629;
|
||||
}
|
||||
/* line 101, ../sass/screen.scss */
|
||||
body #container #inner-container .js .n, body #container #inner-container .ruby .n {
|
||||
body #container #inner-container .js .n, body #container #inner-container .ruby .n, body #container #inner-container .coffeescript .n {
|
||||
color: #cef56b;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user