-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e17bb8
commit 464c3ce
Showing
11 changed files
with
314 additions
and
316 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
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
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
26 changes: 13 additions & 13 deletions
26
2024/ruby/spec/advent_01_spec.rb → ...spec/advent_01_hystorian_hysteria_spec.rb
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
43 changes: 21 additions & 22 deletions
43
2024/ruby/spec/advent_02_spec.rb → .../spec/advent_02_red_nosed_reports_spec.rb
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,52 @@ | ||
require "spec_helper" | ||
require "advent_03_mull_it_over" | ||
|
||
describe "Muller" do | ||
context "with uncorrupted pieces" do | ||
let(:data) { File.read("./spec/fixtures/advent-03-sample-ii.txt").chomp } | ||
|
||
it "parses uncorrupted pieces" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.uncorrupted_pieces).to eq(["mul(2,4)", "mul(8,5)"]) | ||
end | ||
|
||
it "mulls uncorrupted data" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.uncorrupted_mull).to eq(48) | ||
end | ||
end | ||
|
||
context "with sample data" do | ||
let(:data) { File.read("./spec/fixtures/advent-03-sample.txt").chomp } | ||
|
||
it "parses the pieces" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.pieces).to eq(["mul(2,4)", "mul(5,5)", "mul(11,8)", "mul(8,5)"]) | ||
end | ||
|
||
it "mulls the data" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.mull).to eq(161) | ||
end | ||
end | ||
|
||
context "with puzzle data" do | ||
let(:data) { File.read("./spec/fixtures/advent-03.txt").chomp } | ||
|
||
it "mulls the data" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.mull).to eq(165_225_049) | ||
end | ||
|
||
it "mulls uncorrupted data" do | ||
muller = Muller.new(data) | ||
|
||
expect(muller.uncorrupted_mull).to eq(108_830_766) | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.