Sha256: ed2edd731f3217258022e0bed3342d7b35292c572b7af6c92963ecd211eb1b66
Contents?: true
Size: 636 Bytes
Versions: 27
Compression:
Stored size: 636 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' module Synvert::Core describe Rewriter::DeleteAction do subject { source = 'arr.map {}.flatten' node = Parser::CurrentRuby.parse(source) instance = double(current_node: node, file_source: source) Rewriter::DeleteAction.new(instance, :dot, :message).process } it 'gets begin_pos' do expect(subject.begin_pos).to eq 'arr.map {}'.length end it 'gets end_pos' do expect(subject.end_pos).to eq 'arr.map {}.flatten'.length end it 'gets rewritten_code' do expect(subject.rewritten_code).to eq '' end end end
Version data entries
27 entries across 27 versions & 1 rubygems