lilypad 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/gemspec.rb +1 -1
- data/lib/rack/lilypad.rb +1 -0
- data/spec/fixtures/sinatra.rb +1 -1
- data/spec/rack/lilypad_spec.rb +12 -0
- data/spec/spec_helper.rb +3 -0
- metadata +1 -1
data/gemspec.rb
CHANGED
data/lib/rack/lilypad.rb
CHANGED
data/spec/fixtures/sinatra.rb
CHANGED
data/spec/rack/lilypad_spec.rb
CHANGED
@@ -17,11 +17,23 @@ describe Rack::Lilypad do
|
|
17
17
|
Net::HTTP.stub!(:start).and_yield(@http)
|
18
18
|
end
|
19
19
|
|
20
|
+
it "yields a configuration object to the block when created" do
|
21
|
+
notifier = Rack::Lilypad.new(lambda {}, '') do |app|
|
22
|
+
app.filters << %w(T1 T2)
|
23
|
+
end
|
24
|
+
notifier.filters.should include('T1')
|
25
|
+
notifier.filters.should include('T2')
|
26
|
+
end
|
27
|
+
|
20
28
|
it "should post an error to Hoptoad" do
|
21
29
|
@http.should_receive(:post)
|
22
30
|
get "/raise" rescue nil
|
23
31
|
end
|
24
32
|
|
33
|
+
it "should re-raise the exception" do
|
34
|
+
lambda { get "/raise" }.should raise_error(TestError)
|
35
|
+
end
|
36
|
+
|
25
37
|
it "should transfer valid XML to Hoptoad" do
|
26
38
|
get "/raise" rescue nil
|
27
39
|
|
data/spec/spec_helper.rb
CHANGED