Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix tests

  • Loading branch information...
commit b9f91ff881d0b0b7d80a58f13f30976367a8f553 1 parent 35b7d4b
Greg Brockman gdb authored

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +6 4 test/unit/einhorn/command/interface.rb
10 test/unit/einhorn/command/interface.rb
@@ -9,14 +9,16 @@ class InterfaceTest < Test::Unit::TestCase
9 9 should "call that command" do
10 10 conn = stub(:log_debug => nil)
11 11 conn.expects(:write).once.with do |message|
12   - parsed = JSON.parse(message)
  12 + # Remove trailing newline
  13 + message = message[0...-1]
  14 + parsed = YAML.load(URI.unescape(message))
13 15 parsed['message'] =~ /Welcome gdb/
14 16 end
15 17 request = {
16 18 'command' => 'ehlo',
17 19 'user' => 'gdb'
18 20 }
19   - Interface.process_command(conn, JSON.generate(request))
  21 + Interface.process_command(conn, YAML.dump(request))
20 22 end
21 23 end
22 24
@@ -27,7 +29,7 @@ class InterfaceTest < Test::Unit::TestCase
27 29 request = {
28 30 'command' => 'made-up',
29 31 }
30   - Interface.process_command(conn, JSON.generate(request))
  32 + Interface.process_command(conn, YAML.dump(request))
31 33 end
32 34 end
33 35
@@ -41,7 +43,7 @@ class InterfaceTest < Test::Unit::TestCase
41 43 'pid' => 1234
42 44 }
43 45 Einhorn::Command.expects(:register_manual_ack).once.with(1234)
44   - Interface.process_command(conn, JSON.generate(request))
  46 + Interface.process_command(conn, YAML.dump(request))
45 47 end
46 48 end
47 49 end

0 comments on commit b9f91ff

Please sign in to comment.
Something went wrong with that request. Please try again.