Browse files

Added some specs

  • Loading branch information...
1 parent 78dd070 commit 1cca47bab97e5515421124e5fa4f9d2311ddaf73 @toastkid committed Aug 31, 2011
Showing with 1,223 additions and 0 deletions.
  1. +6 −0 Gemfile
  2. +12 −0 Gemfile.lock
  3. 0 README
  4. +19 −0 README.rdoc
  5. +25 −0 Rakefile
  6. +853 −0 fixtures/words1.txt
  7. +20 −0 fixtures/words2.txt
  8. +9 −0 lib/golf.rb
  9. +8 −0 spec/failing_example_groups.report
  10. +11 −0 spec/failing_examples.report
  11. +90 −0 spec/golf_spec.rb
  12. +60 −0 spec/progress.report
  13. +6 −0 spec/spec.opts
  14. +12 −0 spec/spec_helper.rb
  15. +92 −0 spec/specdoc.report
View
6 Gemfile
@@ -0,0 +1,6 @@
+source "http://rubygems.org"
+
+group :development do
+ gem "rspec", "~> 1.3"
+ gem "rake"
+end
View
12 Gemfile.lock
@@ -0,0 +1,12 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ rake (0.9.2)
+ rspec (1.3.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rake
+ rspec (~> 1.3)
View
0 README
No changes.
View
19 README.rdoc
@@ -0,0 +1,19 @@
+= Ruby Golf
+
+== Requirements
+ * ruby 1.8.7
+ * RSpec 1.3
+
+== Setup
+If you have a github account, fork this and then clone your new forked version onto your machine.
+If you don't, then just clone this.
+Either way, cd into the resultant folder on your machine and run 'rake' on the command line - you should get some failing tests followed by a character count.
+
+== How to play
+Ruby Golf is a game whereby the player is required to solve a number of problems (holes) in the fewest characters possible. The course consists of nine holes that you must implement. The holes are class methods that need to be added to the Golf class (lib/golf.rb). The requirements for these methods is specified by a set of RSpec examples for each hole (spec/golf_spec.rb). To run the specs, simply run:
+
+ rake
+
+The first time you run this, all tests will fail. The aim is to get all tests to pass. rake will also report the number of characters you took to complete the course. The fewer characters you use, the better - whitespace doesn't count.
+
+These tests were designed to run in ruby 1.8.7, with no gems other than rspec. Use another version of ruby if you want. Use the internet if you want. Creative solutions are allowed but please don't just go and look up the solutions off an LRUG blog or something.
View
25 Rakefile
@@ -0,0 +1,25 @@
+require 'rubygems'
+require 'rake'
+require 'spec/rake/spectask'
+
+COUNT_WHITESPACE = false
+
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.fail_on_error = false
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+task :default => [:spec, :count]
+
+task :count do
+ open(File.dirname(__FILE__) + "/lib/golf.rb") do |file|
+ solution = file.read
+ solution.gsub!(/\s/,"") unless COUNT_WHITESPACE
+ total_characters = solution.length
+ puts "-----------------------------------------------"
+ puts "| Congratulations, you've completed the course."
+ puts "| Total characters: #{total_characters} "
+ puts "-----------------------------------------------"
+ end
+end
View
853 fixtures/words1.txt
@@ -0,0 +1,853 @@
+a
+able
+about
+account
+acid
+across
+act
+addition
+adjustment
+advertisement
+after
+again
+against
+agreement
+air
+all
+almost
+among
+amount
+amusement
+and
+angle
+angry
+animal
+answer
+ant
+any
+apparatus
+apple
+approval
+arch
+argument
+arm
+army
+art
+as
+at
+attack
+attempt
+attention
+attraction
+authority
+automatic
+awake
+baby
+back
+bad
+bag
+balance
+ball
+band
+base
+basin
+basket
+bath
+be
+beautiful
+because
+bed
+bee
+before
+behaviour
+belief
+bell
+bent
+berry
+between
+bird
+birth
+bit
+bite
+bitter
+black
+blade
+blood
+blow
+blue
+board
+boat
+body
+boiling
+bone
+book
+boot
+bottle
+box
+boy
+brain
+brake
+branch
+brass
+bread
+breath
+brick
+bridge
+bright
+broken
+brother
+brown
+brush
+bucket
+building
+bulb
+burn
+burst
+business
+but
+butter
+button
+by
+cake
+camera
+canvas
+card
+care
+carriage
+cart
+cat
+cause
+certain
+chain
+chalk
+chance
+change
+cheap
+cheese
+chemical
+chest
+chief
+chin
+church
+circle
+clean
+clear
+clock
+cloth
+cloud
+coal
+coat
+cold
+collar
+colour
+comb
+come
+comfort
+committee
+common
+company
+comparison
+competition
+complete
+complex
+condition
+connection
+conscious
+control
+cook
+copper
+copy
+cord
+cork
+cotton
+cough
+country
+cover
+cow
+crack
+credit
+crime
+cruel
+crush
+cry
+cup
+cup
+current
+curtain
+curve
+cushion
+damage
+danger
+dark
+daughter
+day
+dead
+dear
+death
+debt
+decision
+deep
+degree
+delicate
+dependent
+design
+desire
+destruction
+detail
+development
+different
+digestion
+direction
+dirty
+discovery
+discussion
+disease
+disgust
+distance
+distribution
+division
+do
+dog
+door
+doubt
+down
+drain
+drawer
+dress
+drink
+driving
+drop
+dry
+dust
+ear
+early
+earth
+east
+edge
+education
+effect
+egg
+elastic
+electric
+end
+engine
+enough
+equal
+error
+even
+event
+ever
+every
+example
+exchange
+existence
+expansion
+experience
+expert
+eye
+face
+fact
+fall
+false
+family
+far
+farm
+fat
+father
+fear
+feather
+feeble
+feeling
+female
+fertile
+fiction
+field
+fight
+finger
+fire
+first
+fish
+fixed
+flag
+flame
+flat
+flight
+floor
+flower
+fly
+fold
+food
+foolish
+foot
+for
+force
+fork
+form
+forward
+fowl
+frame
+free
+frequent
+friend
+from
+front
+fruit
+full
+future
+garden
+general
+get
+girl
+give
+glass
+glove
+go
+goat
+gold
+good
+government
+grain
+grass
+great
+green
+grey
+grip
+group
+growth
+guide
+gun
+hair
+hammer
+hand
+hanging
+happy
+harbour
+hard
+harmony
+hat
+hate
+have
+he
+head
+healthy
+hear
+hearing
+heart
+heat
+help
+high
+history
+hole
+hollow
+hook
+hope
+horn
+horse
+hospital
+hour
+house
+how
+humour
+I
+ice
+idea
+if
+ill
+important
+impulse
+in
+increase
+industry
+ink
+insect
+instrument
+insurance
+interest
+invention
+iron
+island
+jelly
+jewel
+join
+journey
+judge
+jump
+keep
+kettle
+key
+kick
+kind
+kiss
+knee
+knife
+knot
+knowledge
+land
+language
+last
+late
+laugh
+law
+lead
+leaf
+learning
+leather
+left
+leg
+let
+letter
+level
+library
+lift
+light
+like
+limit
+line
+linen
+lip
+liquid
+list
+little
+living
+lock
+long
+look
+loose
+loss
+loud
+love
+low
+machine
+make
+male
+man
+manager
+map
+mark
+market
+married
+mass
+match
+material
+may
+meal
+measure
+meat
+medical
+meeting
+memory
+metal
+middle
+military
+milk
+mind
+mine
+minute
+mist
+mixed
+money
+monkey
+month
+moon
+morning
+mother
+motion
+mountain
+mouth
+move
+much
+muscle
+music
+nail
+name
+narrow
+nation
+natural
+near
+necessary
+neck
+need
+needle
+nerve
+net
+new
+news
+night
+no
+noise
+normal
+north
+nose
+not
+note
+now
+number
+nut
+observation
+of
+off
+offer
+office
+oil
+old
+on
+only
+open
+operation
+opinion
+opposite
+or
+orange
+order
+organization
+ornament
+other
+out
+oven
+over
+owner
+page
+pain
+paint
+paper
+parallel
+parcel
+part
+past
+paste
+payment
+peace
+pen
+pencil
+person
+physical
+picture
+pig
+pin
+pipe
+place
+plane
+plant
+plate
+play
+please
+pleasure
+plough
+pocket
+point
+poison
+polish
+political
+poor
+porter
+position
+possible
+pot
+potato
+powder
+power
+present
+price
+print
+prison
+private
+probable
+process
+produce
+profit
+property
+prose
+protest
+public
+pull
+pump
+punishment
+purpose
+push
+put
+quality
+question
+quick
+quiet
+quite
+rail
+rain
+range
+rat
+rate
+ray
+reaction
+reading
+ready
+reason
+receipt
+record
+red
+regret
+regular
+relation
+religion
+representative
+request
+respect
+responsible
+rest
+reward
+rhythm
+rice
+right
+ring
+river
+road
+rod
+roll
+roof
+room
+root
+rough
+round
+rub
+rule
+run
+sad
+safe
+sail
+salt
+slat
+same
+sand
+say
+scale
+school
+science
+scissors
+screw
+sea
+seat
+second
+secret
+secretary
+see
+seed
+seem
+selection
+self
+send
+sense
+separate
+serious
+servant
+sex
+shade
+shake
+shame
+sharp
+sheep
+shelf
+ship
+shirt
+shock
+shoe
+short
+shut
+side
+sign
+silk
+silver
+simple
+sister
+size
+skin
+
+skirt
+sky
+sleep
+slip
+slope
+slow
+small
+smash
+smell
+smile
+smoke
+smooth
+snake
+sneeze
+snow
+so
+soap
+society
+sock
+soft
+solid
+some
+
+son
+song
+sort
+sound
+soup
+south
+space
+spade
+special
+sponge
+spoon
+spring
+square
+stage
+stamp
+star
+start
+statement
+station
+steam
+steel
+stem
+step
+stick
+sticky
+stiff
+still
+stitch
+stocking
+stomach
+stone
+stop
+store
+story
+straight
+strange
+street
+stretch
+strong
+structure
+substance
+such
+sudden
+sugar
+suggestion
+summer
+sun
+support
+surprise
+sweet
+swim
+system
+table
+tail
+take
+talk
+tall
+taste
+tax
+teaching
+tendency
+test
+than
+that
+the
+then
+theory
+there
+thick
+thin
+thing
+this
+thought
+thread
+throat
+through
+through
+thumb
+thunder
+ticket
+tight
+till
+time
+tin
+tired
+to
+toe
+together
+tomorrow
+tongue
+tooth
+top
+touch
+town
+trade
+train
+transport
+tray
+tree
+trick
+trouble
+trousers
+true
+turn
+twist
+umbrella
+under
+unit
+up
+use
+value
+verse
+very
+vessel
+view
+violent
+voice
+waiting
+walk
+wall
+war
+warm
+wash
+waste
+watch
+water
+wave
+wax
+way
+weather
+week
+weight
+well
+west
+wet
+wheel
+when
+where
+while
+whip
+whistle
+white
+who
+why
+wide
+will
+wind
+window
+wine
+wing
+winter
+wire
+wise
+with
+woman
+wood
+wool
+word
+work
+worm
+wound
+writing
+wrong
+year
+yellow
+yes
+yesterday
+you
+young
View
20 fixtures/words2.txt
@@ -0,0 +1,20 @@
+a at authority blue burn carriage cart church disease education female foot give kind mark meat music neck number out polish prison range request river root scale seat shake shoe sky stamp start street wall when wood year
+able bag board but cake circle copper crack dead delicate drop error fiction force girl gold grass invention leather loss low measure milk monkey north please political powder prose receipt record road room scissors smell stone such than train trick trousers wheel wire wise
+about against almost belief blood boy bucket cloud coal colour complete decision do dust ear fat fork great hanging ice market may note past plate power quality quick rail red relation respect rest rough self shelf shut sleep thumb tin voice
+account amount answer automatic business by comfort cruel daughter degree detail drain dress egg end flower general green he history hospital insect judge knife land let library machine motion mouth near new opposite potato responsible rice slat seed south tree use war weather wet wool word
+acid addition attack bad bed bent bright cause competition copy cotton cup dependent distribution down early enough father first form house I important industry iron jelly language left leg list morning mountain not observation owner paste pocket quiet rub sad second seem sense shade skin son spoon stomach stop teaching tendency then this through till tooth touch violent watch
+across again agreement air all ant ball behaviour berry bit breath bridge chief complex connection cover debt division doubt edge electric event existence feeble flight friend how humour ink journey late love medical need operation pleasure property purpose rat reading servant side smash steel store straight take there trade walk waste way winter
+act amusement animal apple arch be because black book brass button coat elastic engine exchange expert fowl frequent government group gun like normal of oven pig protest public roof spring star structure substance table umbrella whip woman
+adjustment as basin beautiful bite brick broken card danger dear design face feather floor goat grip happy hope kick letter line linen metal money move much night on parallel parcel rhythm rod school secret silver simple snow sort station stitch suggestion vessel wax where white worm young
+advertisement bitter boot camera collar cow crime cup current day example fertile for heart jewel male mist oil old peace pin plough price punishment reaction run screw size society song steam test thought tomorrow transport unit wash
+after base bell branch brown butter certain cheap cheese chest conscious control country credit curve drink feeling finger fixed flame grey insurance keep knot man nation necessary now order plant porter representative round sheep short slip soap some stage stick sugar sweet thin to under window yes
+among arm baby band bottle cord crush dirty fall fish fruit glass grain harmony hole increase kettle knee level lip make moon nerve net no paper payment physical profit quite reward safe shame shirt smoke statement step tongue water wave while who writing
+and basket bee cloth committee cough equal family farm fire hair hollow horn impulse instrument jump kiss lock long match material memory military off organization picture position produce pull question ready reason sail see ship snake sneeze so solid spade strange through time top trouble true up weight whistle
+angle apparatus boiling box bread canvas cat chin clear cry different distance get go hard head hearing in knowledge loose meal nose office part poison present print ray regret same secretary sign sister smile sound space square sun support swim talk tall turn very wide wing
+angry attention before body clock company curtain dog drawer earth effect ever expansion eye from future glove hat interest lead manager married middle month muscle name narrow needle pencil play process say silk sponge stocking story tail tray value west wrong yesterday
+any army art bulb come deep direction discussion disgust fold laugh light meeting mind mixed nail ornament pipe pot probable put sea skirt sticky thread view will work
+approval brain brush burst care chalk clean cook death fact false food frame growth guide healthy if mine open other pain plane possible push rain ring send sharp that ticket together waiting wind yellow
+argument back between brake chain change chemical comb common damage desire digestion door east even every experience far flag free full garden good heat horse key last liquid news opinion over poor pump right roll smooth sock soft soup stem taste throat tired twist week with wound
+attempt attraction balance bath bird boat chance comparison condition dark driving dry field fight fly hammer hand harbour hate help hook idea ill join lift limit look mass minute mother natural noise nut paint pen private rate religion salt sand science slope special strong summer tax thing thunder toe verse well you
+awake blow bone brother cold cork destruction flat front hear hour island leaf learning little living offer orange page regular rule separate sex slow small still sudden surprise system the theory thick tight wine
+birth blade building cushion development discovery fear foolish forward have high law loud map only or person place point selection serious shock stiff stretch town warm why
View
9 lib/golf.rb
@@ -0,0 +1,9 @@
+class Golf
+ class << self
+
+ def hole1
+ end
+
+ end
+
+end
View
8 spec/failing_example_groups.report
@@ -0,0 +1,8 @@
+Golf.hole1
+Golf.hole3
+Golf.hole4
+Golf.hole5
+Golf.hole6
+Golf.hole7
+Golf.hole8
+Golf.hole9
View
11 spec/failing_examples.report
@@ -0,0 +1,11 @@
+Golf.hole1 should sort all the letters in a string into alphabetical order, ignoring spaces
+Golf.hole3 should read all of the unique words from a file into an array
+Golf.hole3 each entry in the array should be a string with no spaces
+Golf.hole3 should not repeat any words
+Golf.hole4 should return an array of anagrams
+Golf.hole4 should only return strings with than one word in them
+Golf.hole5 should find the longest words that are anagrams of each other, sorted alphabetically
+Golf.hole6 should find the longest set of words that are anagrams of each other, sorted alphabetically
+Golf.hole7 should return all prime numbers up to the given number
+Golf.hole8 should evaluate all code in <# #> and put the result into the given string
+Golf.hole9 should sort all the letters in a string into alphabetical order, ignoring spaces, without using .sort or .sort_by
View
90 spec/golf_spec.rb
@@ -0,0 +1,90 @@
+require File.dirname(__FILE__) + "/spec_helper"
+
+describe "Golf" do
+
+ describe ".hole1" do
+ it "should sort all the letters in a string into alphabetical order, ignoring spaces" do
+ Golf.hole1("the quick brown fox jumped over the lazy dog").should eql("abcddeeeefghhijklmnoooopqrrttuuvwxyz")
+ end
+ end
+
+ describe ".hole2" do
+ it "should return true if two words are anagrams" do
+ Golf.hole2("arrest", "rarest").should eql(true)
+ end
+
+ it "should return false if two words are not anagrams" do
+ Golf.hole2("arresting", "rarest").should eql(false)
+ end
+
+ it "should return false if two words are the same" do
+ Golf.hole2("arresting", "arresting").should eql(false)
+ end
+ end
+
+ describe ".hole3" do
+ it "should read all of the unique words from a file into an array" do
+ Golf.hole3('fixtures/words1.txt').class.should eql(Array)
+ end
+
+ it "each entry in the array should be a string with no spaces" do
+ Golf.hole3('fixtures/words1.txt').select{|s| s =~ /\s/ }.size.should eql(0)
+ end
+
+ it "should not repeat any words" do
+ Golf.hole3('fixtures/words1.txt').uniq.should eql(Golf.hole3('fixtures/words1.txt'))
+ end
+ end
+
+ describe ".hole4" do
+ it "should return an array of anagrams" do
+ Golf.hole4('fixtures/words1.txt').class.should eql(Array)
+ Golf.hole4('fixtures/words1.txt').collect{|member| member.class}.uniq.should eql(String)
+ end
+
+ it "should only return strings with than one word in them" do
+ Golf.hole4('fixtures/words1.txt').size.should eql(Golf.hole4('fixtures/words1.txt').select{|line| line =~ /(\w\s)+\w/ }.size)
+ end
+
+ it "each string should be a list of words that are anagrams of each other, separated by spaces" do
+ end
+ end
+
+ describe ".hole5" do
+ it "should find the longest words that are anagrams of each other, sorted alphabetically" do
+ Golf.hole5('fixtures/words1.txt').should eql("danger garden")
+ end
+ end
+
+ describe ".hole6" do
+ it "should find the longest set of words that are anagrams of each other, sorted alphabetically" do
+ Golf.hole5('fixtures/words1.txt').should eql("last salt slat")
+ end
+ end
+
+
+ describe ".hole7" do
+ it "should return all prime numbers up to the given number" do
+ Golf.hole7(20).should eql([1,2,3,5,7,11,13,17,19])
+ end
+ end
+
+ describe ".hole8" do
+ it "should evaluate all code in <# #> and put the result into the given string" do
+ Golf.hole8("one plus one = <# 1 + 1 #>").should eql("one plus one = 2")
+ @foo = "Bar"
+ Golf.hole8("Going to <# @foo #>camp next weekend?").should eql("Going to barcamp next weekend?")
+ end
+ end
+
+
+ describe ".hole9" do
+ it "should sort all the letters in a string into alphabetical order, ignoring spaces, without using .sort or .sort_by" do
+ Golf.hole1("the quick brown fox jumped over the lazy dog").should eql("abcddeeeefghhijklmnoooopqrrttuuvwxyz")
+ #you should write your own sorting algorithm for this!
+ end
+ end
+
+
+end
+
View
60 spec/progress.report
@@ -0,0 +1,60 @@
+F...FFFFF.FFFFF
+
+1)
+NoMethodError in 'Golf.hole1 should sort all the letters in a string into alphabetical order, ignoring spaces'
+undefined method `hole1' for Golf:Class
+./spec/golf_spec.rb:7:
+
+2)
+TypeError in 'Golf.hole3 should read all of the unique words from a file into an array'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:27:
+
+3)
+TypeError in 'Golf.hole3 each entry in the array should be a string with no spaces'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:31:
+
+4)
+TypeError in 'Golf.hole3 should not repeat any words'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:35:
+
+5)
+NoMethodError in 'Golf.hole4 should return an array of anagrams'
+undefined method `hole4' for Golf:Class
+./spec/golf_spec.rb:41:
+
+6)
+NoMethodError in 'Golf.hole4 should only return strings with than one word in them'
+undefined method `hole4' for Golf:Class
+./spec/golf_spec.rb:46:
+
+7)
+NoMethodError in 'Golf.hole5 should find the longest words that are anagrams of each other, sorted alphabetically'
+undefined method `hole5' for Golf:Class
+./spec/golf_spec.rb:55:
+
+8)
+NoMethodError in 'Golf.hole6 should find the longest set of words that are anagrams of each other, sorted alphabetically'
+undefined method `hole5' for Golf:Class
+./spec/golf_spec.rb:61:
+
+9)
+NoMethodError in 'Golf.hole7 should return all prime numbers up to the given number'
+undefined method `hole7' for Golf:Class
+./spec/golf_spec.rb:68:
+
+10)
+NoMethodError in 'Golf.hole8 should evaluate all code in <# #> and put the result into the given string'
+undefined method `hole8' for Golf:Class
+./spec/golf_spec.rb:74:
+
+11)
+NoMethodError in 'Golf.hole9 should sort all the letters in a string into alphabetical order, ignoring spaces, without using .sort or .sort_by'
+undefined method `hole1' for Golf:Class
+./spec/golf_spec.rb:83:
+
+Finished in 0.065204 seconds
+
+15 examples, 11 failures
View
6 spec/spec.opts
@@ -0,0 +1,6 @@
+--colour
+--format specdoc:spec/specdoc.report
+--format failing_examples:spec/failing_examples.report
+--format failing_example_groups:spec/failing_example_groups.report
+--format progress:spec/progress.report
+--format specdoc
View
12 spec/spec_helper.rb
@@ -0,0 +1,12 @@
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+
+require 'golf'
+
+require 'spec'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+
+end
+
View
92 spec/specdoc.report
@@ -0,0 +1,92 @@
+
+Golf.hole1
+- should sort all the letters in a string into alphabetical order, ignoring spaces (FAILED - 1)
+
+Golf.hole2
+- should return true if two words are anagrams
+- should return false if two words are not anagrams
+- should return false if two words are the same
+
+Golf.hole3
+- should read all of the unique words from a file into an array (FAILED - 2)
+- each entry in the array should be a string with no spaces (FAILED - 3)
+- should not repeat any words (FAILED - 4)
+
+Golf.hole4
+- should return an array of anagrams (FAILED - 5)
+- should only return strings with than one word in them (FAILED - 6)
+- each string should be a list of words that are anagrams of each other, separated by spaces
+
+Golf.hole5
+- should find the longest words that are anagrams of each other, sorted alphabetically (FAILED - 7)
+
+Golf.hole6
+- should find the longest set of words that are anagrams of each other, sorted alphabetically (FAILED - 8)
+
+Golf.hole7
+- should return all prime numbers up to the given number (FAILED - 9)
+
+Golf.hole8
+- should evaluate all code in <# #> and put the result into the given string (FAILED - 10)
+
+Golf.hole9
+- should sort all the letters in a string into alphabetical order, ignoring spaces, without using .sort or .sort_by (FAILED - 11)
+
+1)
+NoMethodError in 'Golf.hole1 should sort all the letters in a string into alphabetical order, ignoring spaces'
+undefined method `hole1' for Golf:Class
+./spec/golf_spec.rb:7:
+
+2)
+TypeError in 'Golf.hole3 should read all of the unique words from a file into an array'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:27:
+
+3)
+TypeError in 'Golf.hole3 each entry in the array should be a string with no spaces'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:31:
+
+4)
+TypeError in 'Golf.hole3 should not repeat any words'
+wrong argument type Symbol (expected Proc)
+./spec/golf_spec.rb:35:
+
+5)
+NoMethodError in 'Golf.hole4 should return an array of anagrams'
+undefined method `hole4' for Golf:Class
+./spec/golf_spec.rb:41:
+
+6)
+NoMethodError in 'Golf.hole4 should only return strings with than one word in them'
+undefined method `hole4' for Golf:Class
+./spec/golf_spec.rb:46:
+
+7)
+NoMethodError in 'Golf.hole5 should find the longest words that are anagrams of each other, sorted alphabetically'
+undefined method `hole5' for Golf:Class
+./spec/golf_spec.rb:55:
+
+8)
+NoMethodError in 'Golf.hole6 should find the longest set of words that are anagrams of each other, sorted alphabetically'
+undefined method `hole5' for Golf:Class
+./spec/golf_spec.rb:61:
+
+9)
+NoMethodError in 'Golf.hole7 should return all prime numbers up to the given number'
+undefined method `hole7' for Golf:Class
+./spec/golf_spec.rb:68:
+
+10)
+NoMethodError in 'Golf.hole8 should evaluate all code in <# #> and put the result into the given string'
+undefined method `hole8' for Golf:Class
+./spec/golf_spec.rb:74:
+
+11)
+NoMethodError in 'Golf.hole9 should sort all the letters in a string into alphabetical order, ignoring spaces, without using .sort or .sort_by'
+undefined method `hole1' for Golf:Class
+./spec/golf_spec.rb:83:
+
+Finished in 0.065204 seconds
+
+15 examples, 11 failures

0 comments on commit 1cca47b

Please sign in to comment.