Transform specs to something useful

This commit is contained in:
Garen Torikian 2013-04-29 15:20:25 -07:00 committed by Garen Torikian & Nathan Sobo
parent 1cc4c52c7a
commit dd041945d2
2 changed files with 28 additions and 1 deletions

View File

@ -1,3 +1,20 @@
## File.markdown ## File.markdown
:cool: :cool:
```ruby
def func
x = 1
end
```
```
function f(x) {
return x++;
}
```
```kombucha
drink-that-stuff:
tastes-weird~
```

View File

@ -31,3 +31,13 @@ describe "MarkdownPreviewView", ->
it "reassociates with the same buffer when deserialized", -> it "reassociates with the same buffer when deserialized", ->
newPreview = deserialize(preview.serialize()) newPreview = deserialize(preview.serialize())
expect(newPreview.buffer).toBe buffer expect(newPreview.buffer).toBe buffer
fdescribe "code block tokenization", ->
describe "when the code block's fence name has a matching grammar", ->
it "tokenizes the code block with the grammar", ->
expect(preview.find("pre code.lang-ruby .entity.name.function.ruby")).toExist()
describe "when the code block's fence name doesn't have a matching grammar", ->
it "does not tokenize the code block", ->
expect(preview.find("pre code:not([class])").children().length).toBe 0
expect(preview.find("pre code.lang-kombucha").children().length).toBe 0