spec/lib/fasterer/rescue_call_spec.rb in fasterer-0.3.2 vs spec/lib/fasterer/rescue_call_spec.rb in fasterer-0.4.0
- old
+ new
@@ -14,49 +14,49 @@
describe 'plain rescue call' do
let(:file_name) { 'plain_rescue.rb' }
it 'should detect constant' do
- expect(rescue_call.rescue_classes).to eq([])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new())
end
end
describe 'rescue call with class' do
let(:file_name) { 'rescue_with_class.rb' }
it 'should detect integer' do
- expect(rescue_call.rescue_classes).to eq([:NoMethodError])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError))
end
end
describe 'rescue call with class and variable' do
let(:file_name) { 'rescue_with_class_and_variable.rb' }
it 'should detect string' do
- expect(rescue_call.rescue_classes).to eq([:NoMethodError])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError))
end
end
describe 'rescue call with variable' do
let(:file_name) { 'rescue_with_variable.rb' }
it 'should detect variable' do
- expect(rescue_call.rescue_classes).to eq([])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new())
end
end
describe 'rescue call with multiple classes' do
let(:file_name) { 'rescue_with_multiple_classes.rb' }
it 'should detect method' do
- expect(rescue_call.rescue_classes).to eq([:NoMethodError, :StandardError])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError, :StandardError))
end
end
describe 'rescue call with multiple classes and variable' do
let(:file_name) { 'rescue_with_multiple_classes_and_variable.rb' }
it 'should detect method' do
- expect(rescue_call.rescue_classes).to eq([:NoMethodError, :StandardError])
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError, :StandardError))
end
end
end