Skip to content

Instantly share code, notes, and snippets.

@cored
Created November 29, 2018 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cored/b323ddc5012d2491a43ace5f7d4ab59f to your computer and use it in GitHub Desktop.
Save cored/b323ddc5012d2491a43ace5f7d4ab59f to your computer and use it in GitHub Desktop.
require "minitest/autorun"
module Anagram
def self.call(words, str)
[]
end
end
describe Anagram do
it "when we pass an empty string" do
words = ["apple", "orange"]
str = ""
Anagram.call(words, str).must_equal []
end
it "when we pass an actual anagram word within the words list" do
words = ["kinship"]
str = "pinkish"
Anagram.call(words, str).must_equal ["kinship"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment