Sha256: 66564ff4c0ea63bf127c3e4670bc495ac8dd57ed32238eac80b0f8c25625e1f9
Contents?: true
Size: 607 Bytes
Versions: 39
Compression:
Stored size: 607 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) Rewriter::DeleteAction.new(instance, :dot, :message) } 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
39 entries across 39 versions & 1 rubygems