Skip to content

Commit

Permalink
simplified helper code
Browse files Browse the repository at this point in the history
  • Loading branch information
auxesis committed Dec 24, 2009
1 parent ee836af commit 691ad03
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions spec/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@

class MockLogger
attr_reader :messages
def initialize
@messages = []
end

%w(warning error info debug).each do |type|
class_eval <<-HERE
def #{type}(message)
@messages ||= []
@messages << message
end
HERE
Expand Down

0 comments on commit 691ad03

Please sign in to comment.