Skip to content

Instantly share code, notes, and snippets.

@nisevi
Created May 3, 2019 14:52
Show Gist options
  • Save nisevi/e549c92acee32713cc5366d0ddae816b to your computer and use it in GitHub Desktop.
Save nisevi/e549c92acee32713cc5366d0ddae816b to your computer and use it in GitHub Desktop.
Spec for covering the new methods
# frozen_string_literal: true
require_relative "../../../lib/thanoscase/string"
RSpec.describe "String class" do
it "should shorten an even string to half its size" do
expect("1234".thanoscase.length).to eq(2)
end
it "should shorten an odd string to half its size plus 1" do
expect("12345".thanoscase.length).to eq(3)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment