Sha256: 785cc823cfe8cd2876d8972dd082ed3a89124f841f9d32ffed9fbb10713f5f4a

Contents?: true

Size: 496 Bytes

Versions: 6

Compression:

Stored size: 496 Bytes

Contents

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

RSpec.describe Reek::Context::SingletonMethodContext do
  let(:smc) do
    sexp = sexp(:def, :foo, sexp(:args, sexp(: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 sexp(:send, sexp(:lvar, :bar), :baz)
      expect(smc.envious_receivers).to be_empty
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
reek-3.7.1 spec/reek/context/singleton_method_context_spec.rb
reek-3.7.0 spec/reek/context/singleton_method_context_spec.rb
reek-3.6.1 spec/reek/context/singleton_method_context_spec.rb
reek-3.6.0 spec/reek/context/singleton_method_context_spec.rb
reek-3.5.0 spec/reek/context/singleton_method_context_spec.rb
reek-3.4.1 spec/reek/context/singleton_method_context_spec.rb