Sha256: 886e2c6dba94a14df9fc486d158fe9d144aa0bed809547f1c5f14d5aa2b318eb
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 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) } 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
synvert-core-0.56.1 | spec/synvert/core/rewriter/action/delete_action_spec.rb |
synvert-core-0.56.0 | spec/synvert/core/rewriter/action/delete_action_spec.rb |