var assert = require('assert');
var GitterBot = require('../lib/GitterBot');
var API_KEY = 'API_KEY';

describe('GitterBot', function () {
  it('Should properly exports', function () {
    assert.equal(typeof GitterBot, 'function');
  });

  it('Should properly create instance of GitterBot', function () {
    assert(new GitterBot() instanceof GitterBot);
  });

  it('Should properly create GitterBot with API Key', function () {
    var bot = new GitterBot(API_KEY);

    assert.equal(bot.getApiKey(), API_KEY);
  });

  it('Should properly start gitter bot for listening', function () {
    var bot = new GitterBot(API_KEY);

    assert(!bot._isStarted);
    assert(bot.start() instanceof GitterBot);
    assert(bot._isStarted);
  });

  it('Should properly stop gitter bot for listening', function () {
    var bot = new GitterBot(API_KEY);

    assert(bot._isStarted);
    assert(bot.stop() instanceof GitterBot);
    assert(!bot._isStarted);
  });

  it('Should properly reconnect', function () {
    var bot = new GitterBot(API_KEY);
    assert(bot.reconnect() instanceof GitterBot);
  });
});

@@ -94,16 +94,85 @@
 PI_KEY';
+%0Avar ROOM_NAME = 'ghaiklor/uwcua-vii';%0Avar EXEC_PATTERN = /%5Ecalc%5Cs*/;
 %0A%0Adescri
@@ -452,35 +452,21 @@
 rly 
-create GitterBot with
+get/set
  API 
-K
+k
 ey',
@@ -504,35 +504,44 @@
 w GitterBot(
+%7BapiKey: 
 API_KEY
+%7D
 );%0A
-%0A
     assert.e
@@ -576,123 +576,43 @@
 Y);%0A
-  %7D);%0A%0A  it('Should properly start gitter bot for listening', function () %7B%0A    var bot = new GitterBot(API_KEY
+%0A    bot.setApiKey('new-api-key'
 );%0A
-%0A
     
@@ -621,98 +621,45 @@
 sert
-(!bot._isStarted);%0A    assert(bot.start() instanceof GitterBot);%0A    assert(bot._isStarted
+.equal(bot.getApiKey(), 'new-api-key'
 );%0A 
@@ -690,37 +690,25 @@
 rly 
-stop gitter bot for listening
+get/set room name
 ', f
@@ -748,27 +748,40 @@
 tterBot(
-API_KEY
+%7BroomName: ROOM_NAME%7D
 );%0A
-%0A
     asse
@@ -786,97 +786,126 @@
 sert
-(bot._isStarted
+.equal(bot.getRoomName(), ROOM_NAME
 );%0A
+%0A
     
-assert(bot.stop() instanceof GitterBot);%0A    assert(!bot._isStarted
+bot.setRoomName('new-room');%0A    assert.equal(bot.getRoomName(), 'new-room'
 );%0A 
@@ -932,25 +932,36 @@
 roperly 
-reconnect
+get/set exec pattern
 ', funct
@@ -1001,65 +1001,184 @@
 Bot(
-API_KEY);%0A    assert(bot.reconnect() instanceof Gi
+%7BexecPattern: EXEC_PATTERN%7D);%0A    assert.equal(bot.getExecPattern(), EXEC_PATTERN);%0A%0A    bot.setExecPattern('%5Emy pattern');%0A    assert.equal(bot.getExecPattern(), '%5Emy pa
 tter
-Bot
+n'
 );%0A 

Write tests