Sha256: 0f3b48ddd3fc409cdbf754b1f3292bed7e7380b3da7726db501f0e36bd181b85

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Adamantium::ModuleMethods, '#memoized?' do
  let(:object) do
    Class.new do
      include Adamantium
      def foo
      end
      memoize :foo
    end
  end

  subject { object.memoized?(name) }

  context 'with memoized method' do
    let(:name) { :foo }

    it { should be(true) }
  end

  context 'with non memoized method' do
    let(:name) { :bar }

    it { should be(false) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adamantium-0.2.0 spec/unit/adamantium/module_methods/memoized_predicate_spec.rb
adamantium-0.1.0 spec/unit/adamantium/module_methods/memoized_predicate_spec.rb