chatterbox 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml
CHANGED
data/chatterbox.gemspec
CHANGED
@@ -30,6 +30,21 @@ ruby_version: 1.8.6
|
|
30
30
|
EOL
|
31
31
|
presenter.body.strip.should == expected.strip
|
32
32
|
end
|
33
|
+
|
34
|
+
it "renders un ordered sections" do
|
35
|
+
options = {:exception => Exception.new, :other => "values and things", :hey => {"dragons" => "here"}}
|
36
|
+
presenter = Chatterbox::ExceptionNotification::Presenter.new(options)
|
37
|
+
expected =<<EOL
|
38
|
+
Other
|
39
|
+
----------
|
40
|
+
values and things
|
41
|
+
|
42
|
+
Hey
|
43
|
+
----------
|
44
|
+
dragons: here
|
45
|
+
EOL
|
46
|
+
presenter.body.should include(expected)
|
47
|
+
end
|
33
48
|
end
|
34
49
|
|
35
50
|
describe "render_section" do
|
@@ -32,6 +32,10 @@ module Chatterbox::ExceptionNotification
|
|
32
32
|
output = render_section(section)
|
33
33
|
body << output if output
|
34
34
|
end
|
35
|
+
options.keys.each do |other_sections|
|
36
|
+
output = render_section(other_sections)
|
37
|
+
body << output if output
|
38
|
+
end
|
35
39
|
body
|
36
40
|
end
|
37
41
|
|
@@ -40,7 +44,7 @@ module Chatterbox::ExceptionNotification
|
|
40
44
|
output = key.to_s.titleize
|
41
45
|
output << "\n"
|
42
46
|
output << "----------\n"
|
43
|
-
output << "#{inspect_value(options
|
47
|
+
output << "#{inspect_value(options.delete(key))}\n\n"
|
44
48
|
output
|
45
49
|
end
|
46
50
|
|