Sha256: 04efa175c3f2899e3dfce1c4c4e3dbc5783ba0360f39870474c6333f52aa8dd6

Contents?: true

Size: 353 Bytes

Versions: 1

Compression:

Stored size: 353 Bytes

Contents

require 'spec_helper'

describe Lita::Handlers::Eval, lita_handler: true do
  it 'evaluates the code' do
    stub_request(:put, 'http://tryruby.org/levels/1/challenges/0/play')
      .with(body: {cmd: '2 + 2'})
      .to_return(status: 200, body: MultiJson.dump(output: '4'))
    send_command('eval 2 + 2')
    expect(replies.last).to eq('4')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-eval-0.2.0 spec/lita/handlers/eval_spec.rb