Skip to content

Instantly share code, notes, and snippets.

@msarit
Last active April 6, 2018 20:49
Show Gist options
  • Save msarit/54b8b07d5ca48dcde4f00a2ea3d639d3 to your computer and use it in GitHub Desktop.
Save msarit/54b8b07d5ca48dcde4f00a2ea3d639d3 to your computer and use it in GitHub Desktop.
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