Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'day7'
- describe "Integration Test" do
- subject(:d) { Day7.new }
- before(:each) do
- @f = File.read("lib/input.txt")
- @f2 = File.read("lib/input2.txt")
- @RESULT1 = 16076
- @RESULT2 = 2797
- end
- it "calculates the right signal for challenge 1" do
- lines = @f.split("\n")
- d.reverse_data
- d.sort_file
- d.trim
- d.convert_to_hash
- expect(d.process_signals).to eq @RESULT1
- end
- it "calculates the right signal for challenge 2" do
- lines = @f2.split("\n")
- d.reverse_data
- d.sort_file
- d.trim
- d.convert_to_hash
- expect(d.process_signals).to eq @RESULT1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement