Sha256: 81b06e497da2811e685e28587a04891ed76527451aef4be6d2c0903fcb299693

Contents?: true

Size: 414 Bytes

Versions: 79

Compression:

Stored size: 414 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module Synvert::Core
  describe Rewriter::Action do
    subject {
      source = "before_save do\n  return false\nend"
      block_node = Parser::CurrentRuby.parse(source).body.first
      instance = double(current_node: block_node)
      Rewriter::Action.new(instance, source)
    }

    it 'gets line' do
      expect(subject.line).to eq 2
    end
  end
end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
synvert-core-0.54.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.53.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.52.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.52.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.51.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.51.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.50.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.49.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.49.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.48.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.47.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.46.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.45.2 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.45.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.45.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.44.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.44.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.42.1 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.42.0 spec/synvert/core/rewriter/action_spec.rb
synvert-core-0.41.2 spec/synvert/core/rewriter/action_spec.rb