Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version 0.3.1 - Upgrading require, specifying gem versions, getting s…

…inatra spec passing under 1.0
  • Loading branch information...
commit d6cf9362a9d1a779bed9c6a45334cc53cf1e6c6a 1 parent c4f2cb2
Winton Welsh winton authored

Showing 2 changed files with 13 additions and 12 deletions. Show diff stats Hide diff stats

  1. +8 8 require.rb
  2. +5 4 spec/lilypad/adapters/sinatra_spec.rb
16 require.rb
@@ -2,16 +2,16 @@
2 2 gem 'require'
3 3 require 'require'
4 4
5   -Require File.dirname(__FILE__) do
  5 +Require do
6 6 gem(:builder, '>=2.1.2') { require 'builder' }
7   - gem(:nokogiri) { require 'nokogiri' }
8   - gem(:rack) { require 'rack' }
9   - gem(:'rack-test') { require 'rack/test' }
10   - gem :rails
  7 + gem(:nokogiri, '>=1.4.1') { require 'nokogiri' }
  8 + gem(:rack, '>=1.0.1') { require 'rack' }
  9 + gem(:'rack-test', '>=0.5.3') { require 'rack/test' }
  10 + gem(:rails, '=2.3.5')
11 11 gem(:rake, '=0.8.7') { require 'rake' }
12   - gem :require, '=0.1.8'
  12 + gem :require, '=0.2.6'
13 13 gem :rspec, '=1.3.0'
14   - gem(:sinatra) { require 'sinatra/base' }
  14 + gem(:sinatra, '1.0') { require 'sinatra/base' }
15 15
16 16 gemspec do
17 17 author 'Winton Welsh'
@@ -23,7 +23,7 @@
23 23 name 'lilypad'
24 24 homepage "http://github.com/winton/#{name}"
25 25 summary "Hoptoad notifier for rack-based frameworks"
26   - version '0.3.0'
  26 + version '0.3.1'
27 27 end
28 28
29 29 lib do
9 spec/lilypad/adapters/sinatra_spec.rb
@@ -20,18 +20,18 @@ def app
20 20
21 21 it "should post an error to Hoptoad" do
22 22 @http.should_receive(:post)
23   - get "/test" rescue nil
  23 + get "/test"
24 24 end
25 25
26 26 it "should post middleware exceptions" do
27 27 @http.should_receive(:post)
28   - get "/nothing?test_exception=1" rescue nil
  28 + get "/nothing?test_exception=1"
29 29 end
30 30
31 31 it "should not post anything if non-production environment" do
32 32 ENV['RACK_ENV'] = 'development'
33 33 @http.should_not_receive(:post)
34   - get "/test" rescue nil
  34 + get "/test"
35 35 end
36 36 end
37 37
@@ -43,7 +43,8 @@ def app
43 43 end
44 44
45 45 it "should re-raise the exception" do
46   - lambda { get "/test" }.should raise_error(TestError)
  46 + get "/test"
  47 + last_response.errors.include?('TestError').should == true
47 48 end
48 49 end
49 50 end

0 comments on commit d6cf936

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