Permalink
Browse files

display real Ruby error also for 'NoMethodError'

  • Loading branch information...
1 parent f5d784b commit 10e030f8f2a5821cbec2e16f6eb51f81346c1b1e @ultrasaurus ultrasaurus committed Sep 11, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/pie.rb
  2. +1 −1 pie.gemspec
  3. +1 −1 spec/pie_spec.rb
View
@@ -60,7 +60,7 @@ def place(options)
def method_missing name
place = places[name.to_sym]
- raise NoMethodError, "Pie was expecting a place named '#{name}', but we've only got places named: #{places.keys.join(', ')}" if place.nil?
+ raise NoMethodError, "NoMethodError: Pie was expecting a place named '#{name}', but we've only got places named: #{places.keys.join(', ')}" if place.nil?
place
end
View
@@ -3,7 +3,7 @@ spec = Gem::Specification.new do |s|
s.name = 'pie'
s.authors = 'Sarah Allen, Sarah Mei, Rich Kilmer'
s.homepage = 'http://github.com/blazingcloud/pie'
- s.version = '0.2.12'
+ s.version = '0.2.13'
s.summary = 'Pie, a language for developing games and books'
s.files = Dir['lib/*.rb']+Dir['views/*.erb']+['README.md', 'MIT-LICENSE.txt', 'bin/pie']
s.bindir = 'bin'
View
@@ -104,7 +104,7 @@ def get_binding
place boat:"this is a boat"
something.path boat:north
end
- }.should raise_error(SyntaxError, "#<NoMethodError: Pie was expecting a place named 'something', but we've only got places named: boat")
+ }.should raise_error(NoMethodError, "NoMethodError: Pie was expecting a place named 'something', but we've only got places named: boat")
end

0 comments on commit 10e030f

Please sign in to comment.