Sha256: 9c5633f8da88702caefef55ea54a61b42f121d61d2e41ed4ee27f2f08451f134

Contents?: true

Size: 511 Bytes

Versions: 110

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module Synvert::Core
  describe Rewriter::Warning do
    subject {
      source = "def test\n  debugger\nend"
      send_node = Parser::CurrentRuby.parse(source).body.first
      instance = double(current_node: send_node, current_file: 'app/test.rb')
      Rewriter::Warning.new(instance, 'remove debugger')
    }

    it 'gets message with filename and line number' do
      expect(subject.message).to eq 'app/test.rb#2: remove debugger'
    end
  end
end

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
synvert-core-1.15.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.14.2 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.14.1 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.14.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.13.1 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.13.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.12.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.11.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.10.1 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.10.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.9.2 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.9.1 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.9.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.8.1 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.8.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.7.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.6.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.5.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.4.0 spec/synvert/core/rewriter/warning_spec.rb
synvert-core-1.3.1 spec/synvert/core/rewriter/warning_spec.rb