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
|
and the Jasmine test server when you're using CoffeeScript. CoffeeScript files are compiled and injected into the generated HTML
|
||||||
files.
|
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
|
#### Server interaction
|
||||||
|
|
||||||
Since there's no Jasmine server running, there's no way to grab test files from the filesystem via Ajax.
|
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
|
end
|
||||||
{% endhighlight %}
|
{% 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.
|
## I have a problem or helpful suggestion, good sir.
|
||||||
|
|
||||||
Here's what you can do:
|
Here's what you can do:
|
||||||
|
@ -77,12 +77,12 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.js, .ruby {
|
.js, .ruby, .coffeescript {
|
||||||
.nx {
|
.nx {
|
||||||
color: $indicator-code-color;
|
color: $indicator-code-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s1 {
|
.s1, .ss {
|
||||||
color: $scalar-code-color;
|
color: $scalar-code-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,26 +89,26 @@ body #container #inner-container .yaml .p-Indicator {
|
|||||||
color: #78a39d;
|
color: #78a39d;
|
||||||
}
|
}
|
||||||
/* line 81, ../sass/screen.scss */
|
/* 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;
|
color: #78a39d;
|
||||||
}
|
}
|
||||||
/* line 85, ../sass/screen.scss */
|
/* 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;
|
color: #e68917;
|
||||||
}
|
}
|
||||||
/* line 89, ../sass/screen.scss */
|
/* 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;
|
color: #abb592;
|
||||||
}
|
}
|
||||||
/* line 93, ../sass/screen.scss */
|
/* 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;
|
color: #a7b585;
|
||||||
}
|
}
|
||||||
/* line 97, ../sass/screen.scss */
|
/* 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;
|
color: #de1629;
|
||||||
}
|
}
|
||||||
/* line 101, ../sass/screen.scss */
|
/* 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;
|
color: #cef56b;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user