Sha256: a4212e35a4f4f699aac7fc3767c1b093af84e32dbac33d6b5a15e07953ea0756

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

require 'spec_helper'

describe WordScramble::Descrambler do
  let(:descrambled) { WordScramble::Descrambler.new(@scrambled).matching_words }

  it "descrambles leloh" do
    @scrambled = "leloh"
    descrambled.should include("hello")
  end

  it "descrambles liopt" do
    @scrambled = "liopt"
    descrambled.should include("pilot")
  end

  it "descrambles realapin" do
    @scrambled = "realapin"
    descrambled.should include("airplane")
  end

  it "orders the matching words by length" do
    @scrambled = "liopt"
    descrambled.first.downcase.should == "pilot"
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
word_scramble-0.0.5 spec/descrambler_spec.rb
word_scramble-0.0.4 spec/descrambler_spec.rb
word_scramble-0.0.3 spec/descrambler_spec.rb