Sha256: 31184e4b81603175e9a16dc21f85f4683756fce56f6122f413fcb30174d5679e

Contents?: true

Size: 254 Bytes

Versions: 15

Compression:

Stored size: 254 Bytes

Contents

shared_examples 'a memoized helper' do
  it 'returns the same instance every time' do
    method = self.class.parent_groups[1].description.delete('#')
    first_result = subject.send(method)
    expect(first_result).to be(subject.send(method))
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sitehub-0.5.0.alpha12 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.4.10 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha11 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha10 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha8 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha7 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha6 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha5 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha4 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha3 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.5.0.alpha2 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.4.9 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.4.8 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.4.7 spec/support/shared_examples/memoized_helpers.rb
sitehub-0.4.6 spec/support/shared_examples/memoized_helpers.rb