Skip to content

Commit

Permalink
All tests passing 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmaissroff committed Dec 14, 2021
1 parent d046d0a commit 6d979c1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/memo_wise_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def child_method
context "when the class inherits memoization from multiple modules" do
let(:module1) do
Module.new do
prepend MemoWise
extend MemoWise

def module1_method_counter
@module1_method_counter || 0 # rubocop:disable RSpec/InstanceVariable
Expand All @@ -332,7 +332,7 @@ def module1_method

let(:module2) do
Module.new do
prepend MemoWise
extend MemoWise

def module2_method_counter
@module2_method_counter || 0 # rubocop:disable RSpec/InstanceVariable
Expand Down Expand Up @@ -370,7 +370,7 @@ def module2_method
context "when the class, its superclass, and its module all memoize methods" do
let(:parent_class) do
Class.new do
prepend MemoWise
extend MemoWise

def parent_class_method_counter
@parent_class_method_counter || 0
Expand All @@ -386,7 +386,7 @@ def parent_class_method

let(:module1) do
Module.new do
prepend MemoWise
extend MemoWise

def module1_method_counter
@module1_method_counter || 0 # rubocop:disable RSpec/InstanceVariable
Expand Down Expand Up @@ -448,7 +448,7 @@ def child_class_method

it "creates a class-level instance variable" do
# NOTE: test implementation detail to ensure the inverse test is valid
expect(class_with_memo.instance_variables).to include(:@_memo_wise)
expect(class_with_memo.public_methods).to include(:_memo_wise)
end

it_behaves_like "handles memoized/non-memoized methods with the same name at different scopes" do
Expand Down Expand Up @@ -519,7 +519,7 @@ def self.child_method

it "creates a class-level instance variable" do
# NOTE: this test ensure the inverse test above continues to be valid
expect(class_with_memo.instance_variables).to include(:@_memo_wise)
expect(class_with_memo.public_methods).to include(:_memo_wise)
end

it_behaves_like "handles memoized/non-memoized methods with the same name at different scopes" do
Expand Down Expand Up @@ -597,7 +597,7 @@ def child_method

it "creates a module-level instance variable" do
# NOTE: test implementation detail to ensure the inverse test is valid
expect(module_with_memo.instance_variables).to include(:@_memo_wise)
expect(module_with_memo.public_methods).to include(:_memo_wise)
end

context "when an invalid hash key is passed to .memo_wise" do
Expand Down Expand Up @@ -626,7 +626,7 @@ def self.module_method; end

it "creates a module-level instance variable" do
# NOTE: this test ensure the inverse test above continues to be valid
expect(module_with_memo.instance_variables).to include(:@_memo_wise)
expect(module_with_memo.public_methods).to include(:_memo_wise)
end
end
end
Expand Down

0 comments on commit 6d979c1

Please sign in to comment.