spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb in punchblock-0.9.2 vs spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb in punchblock-0.10.0
- old
+ new
@@ -1,5 +1,7 @@
+# encoding: utf-8
+
require 'spec_helper'
module Punchblock
module Translator
class Asterisk
@@ -116,46 +118,46 @@
command.should be_complete
complete_event = command.complete_event 0.5
- complete_event.component_id.should == component_id.to_s
- complete_event.reason.should == expected_complete_reason
+ complete_event.component_id.should be == component_id.to_s
+ complete_event.reason.should be == expected_complete_reason
end
end
end
describe '#parse_agi_result' do
context 'with a simple result with no data' do
let(:result_string) { "200%20result=123%0A" }
it 'should provide the code and result' do
code, result, data = subject.parse_agi_result result_string
- code.should == 200
- result.should == 123
- data.should == ''
+ code.should be == 200
+ result.should be == 123
+ data.should be == ''
end
end
context 'with a result and data in parens' do
let(:result_string) { "200%20result=-123%20(timeout)%0A" }
it 'should provide the code and result' do
code, result, data = subject.parse_agi_result result_string
- code.should == 200
- result.should == -123
- data.should == 'timeout'
+ code.should be == 200
+ result.should be == -123
+ data.should be == 'timeout'
end
end
context 'with a result and key-value data' do
let(:result_string) { "200%20result=123%20foo=bar%0A" }
it 'should provide the code and result' do
code, result, data = subject.parse_agi_result result_string
- code.should == 200
- result.should == 123
- data.should == 'foo=bar'
+ code.should be == 200
+ result.should be == 123
+ data.should be == 'foo=bar'
end
end
end
end
end