Last active
April 6, 2018 20:49
-
-
Save msarit/54b8b07d5ca48dcde4f00a2ea3d639d3 to your computer and use it in GitHub Desktop.
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
require_relative "./linkedlistnode1and2.rb" | |
RSpec.describe 'mutate_list' do | |
it "should return the expected values" do | |
node1 = LinkedListNode.new(1) | |
node2 = LinkedListNode.new(2,node1) | |
mutate = mutate_list(node2) | |
expect(mutate.value).to eq 1 | |
expect(mutate.next_node.value).to eq 2 | |
expect(mutate.next_node.next_node).to eq nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment