Sha256: 468af7ecff417bd2ac0d9da84b54971dba2823bc809f784f60ce6517f4949466

Contents?: true

Size: 499 Bytes

Versions: 4

Compression:

Stored size: 499 Bytes

Contents

require_relative '../../spec_helper'
require_relative '../../../lib/reek/context/singleton_method_context'

RSpec.describe Reek::Context::SingletonMethodContext do
  let(:smc) do
    sexp = s(:def, :foo, s(:args, s(:arg, :bar)), nil)
    Reek::Context::SingletonMethodContext.new(nil, sexp)
  end

  describe '#envious_receivers' do
    it 'should not record envious calls' do
      smc.record_call_to s(:send, s(:lvar, :bar), :baz)
      expect(smc.envious_receivers).to be_empty
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
reek-3.3.0 spec/reek/context/singleton_method_context_spec.rb
reek-3.2.1 spec/reek/context/singleton_method_context_spec.rb
reek-3.2 spec/reek/context/singleton_method_context_spec.rb
reek-3.1 spec/reek/context/singleton_method_context_spec.rb