Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some Ruby 1.9 issues

  • Loading branch information...
commit e757649d394e138e53bcbe023653e1c07d575b6a 1 parent 1ff0714
Joe Ferris authored
2  lib/hoptoad_notifier/notice.rb
@@ -106,7 +106,7 @@ def to_xml
106 106 notifier.url(notifier_url)
107 107 end
108 108 notice.error do |error|
109   - error.class(error_class)
  109 + error.tag!('class', error_class)
110 110 error.message(error_message)
111 111 error.backtrace do |backtrace|
112 112 self.backtrace.lines.each do |line|
7 test/catcher_test.rb
@@ -24,7 +24,12 @@ def build_controller_class(&definition)
24 24
25 25 def assert_sent_hash(hash, xpath)
26 26 hash.each do |key, value|
27   - assert_sent_element value.to_s, "#{xpath}/var[@key = '#{key}']"
  27 + element_xpath = "#{xpath}/var[@key = '#{key}']"
  28 + if value.respond_to?(:to_hash)
  29 + assert_sent_hash value.to_hash, element_xpath
  30 + else
  31 + assert_sent_element value.to_s, element_xpath
  32 + end
28 33 end
29 34 end
30 35
2  test/configuration_test.rb
@@ -165,7 +165,7 @@ def assert_config_overridable(option, value = 'a value')
165 165 def assert_appends_value(option, &block)
166 166 config = HoptoadNotifier::Configuration.new
167 167 original_values = config.send(option).dup
168   - block ||= lambda do
  168 + block ||= lambda do |config|
169 169 new_value = 'hello'
170 170 config.send(option) << new_value
171 171 new_value
2  test/notice_test.rb
@@ -256,7 +256,7 @@ def stub_request(attrs = {})
256 256 should "not ignore an exception not matching ignore filters" do
257 257 notice = build_notice(:error_class => 'ArgumentError',
258 258 :ignore => ['Argument'],
259   - :ignore_by_filters => [lambda { false }])
  259 + :ignore_by_filters => [lambda { |notice| false }])
260 260 assert !notice.ignore?
261 261 end
262 262

0 comments on commit e757649

Please sign in to comment.
Something went wrong with that request. Please try again.