-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add memoization for methods based on immutable state
[Fix #9]
- Loading branch information
Showing
5 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
threshold: 15.0 | ||
threshold: 16.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# encoding: utf-8 | ||
|
||
require 'spec_helper' | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
describe Adamantium, '#hash' do | ||
subject { object.hash } | ||
|
||
let(:object) { described_class.new } | ||
let(:described_class) { AdamantiumSpecs::Object } | ||
|
||
it_behaves_like 'a hash method' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# encoding: utf-8 | ||
|
||
require 'spec_helper' | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
describe Adamantium, '#inspect' do | ||
subject { object.inspect } | ||
|
||
let(:object) { described_class.new } | ||
let(:described_class) { AdamantiumSpecs::Object } | ||
|
||
it_behaves_like 'an idempotent method' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# encoding: utf-8 | ||
|
||
require 'spec_helper' | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
describe Adamantium, '#to_s' do | ||
subject { object.to_s } | ||
|
||
let(:object) { described_class.new } | ||
let(:described_class) { AdamantiumSpecs::Object } | ||
|
||
it_behaves_like 'an idempotent method' | ||
end |