     rte1.deleteWords(7, 8)
     rte1.val().should.equal "There is a mistake in this sentence! "
 
-  it 'not delete space after word when selection ends at last character', ->
+  it 'not delete space after word when selection ends at last character [deleteSel]', ->
     rte1 = new Rte "I am yjs here!"
     sel = new Selection(5, 8, rte1)
     rte1.deleteSel(sel)
     rte1.val().should.equal "I am  here!"
 
-  it 'delete space and merge (if necessary)', ->
+  it 'delete space and merge (if necessary) [deleteSel]', ->
     rte1 = new Rte "y jjs is here!"
     sel = new Selection(1, 3, rte1)
     rte1.deleteSel(sel)
     rte1.val().should.equal "yjs is here!"
 
-  it 'merge words when no space anymore', ->
+  it 'merge words when no space anymore [deleteSel]', ->
     rte1 = new Rte "yjs is is here!"
     sel = new Selection(4, 7, rte1)
     rte1.deleteSel(sel)
     rte1.val().should.equal "yjs is here!"
 
-  it 'merge the two words', ->
+  it 'merge the two words [merge]', ->
     rte1 = new Rte "Hel lo"
     rte1.merge(0)
     rte1.val().should.equal "Hello"
 
-  # it 'throw an error', ->
-  #   rte1 = new Rte "Some string"
-  #   sel = new Selection({word:1, pos:0}, {word:0, pos:0})
-  #   expect(rte1.deleteSel(sel)).to.throw Error("Invalid selection")
-
-  it 'should accept deltas (insert)', ->
+  it 'insert correctly [insert]', ->
+    rte1 =  new Rte ""
+    sel = new Selection(0, 0, rte1)
+    rte1.insert(sel, "Two words")
+    rte1.val().should.equal "Two words"
+    rte1._rte.words.length.should.equal 2
+    sel = new Selection(4, 0, rte1)
+    rte1.insert(sel, "inserted ")
+    rte1.val().should.equal "Two inserted words"
+    rte1._rte.words.length.should.equal 3
+
+  it 'support styles [setStyle]', ->
+    rte1 =  new Rte "I am testing styles"
+    sel0 = new Selection 0, 3, rte1
+    rte1.setStyle sel0, "bold"
+
+  it 'accept deltas (insert) [delta]', ->
     delta = { ops:[
       { insert: 'Gandalf', attributes: { bold: true } },
       { insert: ' the ' },

  rte1 = rte2 = null
  ar = ["This", "is", "a ", "test"]

  it 'initialize correctly', ->
    rte1 = new Rte "Test"
    rte1.val().should.equal "Test"

  it 'split the words correctly', ->
    rte1 = new Rte "This is a  test"
    rte1.val().should.equal "This is a  test"
    rte1 = new Rte "   "
    rte1.val().should.equal "   "

  it 'insert words correctly', ->
    rte1 = new Rte "is"
    rte1.insertWords(0, ["This "])
    rte1.val().should.equal "This is"
    rte1.insertWords(2, [" sparta ", "!"])
    rte1.val().should.equal "This is sparta !"

  it 'delete words correctly', ->
    rte1 = new Rte "This There is a mistake in this sentence!"
    rte1.deleteWords(0, 1)
    rte1.val().should.equal "There is a mistake in this sentence!"

    rte1.delta delta
    rte1.val().should.equal "Gandalf Grey"

  it 'should accept deltas (style) [delta]', ->
    delta = {ops:[
      { retain: 7, attributes: {bold: true } }]}
    rte1 = new Rte "Gandalf the Grey"
    rte1.delta delta

describe 'Selection object should', ->
  sel = sel2 = word = null
  rte = new Rte "Zero One two three four five"

  it 'initialized with three parameters [constructor]', ->
    sel = new Selection 1, 7, rte

  it 'convert positions correctly [_relativeFromAbsolute]', ->
    sel = new Selection 1, 7, rte
    sel.should.have.property('startPos')
    sel.should.have.deep.property('startPos.word', 0)
