Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 with 13 additions and 12 deletions.
  1. +8 −8 require.rb
  2. +5 −4 spec/lilypad/adapters/sinatra_spec.rb
16 require.rb
View
@@ -2,16 +2,16 @@
gem 'require'
require 'require'
-Require File.dirname(__FILE__) do
+Require do
gem(:builder, '>=2.1.2') { require 'builder' }
- gem(:nokogiri) { require 'nokogiri' }
- gem(:rack) { require 'rack' }
- gem(:'rack-test') { require 'rack/test' }
- gem :rails
+ gem(:nokogiri, '>=1.4.1') { require 'nokogiri' }
+ gem(:rack, '>=1.0.1') { require 'rack' }
+ gem(:'rack-test', '>=0.5.3') { require 'rack/test' }
+ gem(:rails, '=2.3.5')
gem(:rake, '=0.8.7') { require 'rake' }
- gem :require, '=0.1.8'
+ gem :require, '=0.2.6'
gem :rspec, '=1.3.0'
- gem(:sinatra) { require 'sinatra/base' }
+ gem(:sinatra, '1.0') { require 'sinatra/base' }
gemspec do
author 'Winton Welsh'
@@ -23,7 +23,7 @@
name 'lilypad'
homepage "http://github.com/winton/#{name}"
summary "Hoptoad notifier for rack-based frameworks"
- version '0.3.0'
+ version '0.3.1'
end
lib do
9 spec/lilypad/adapters/sinatra_spec.rb
View
@@ -20,18 +20,18 @@ def app
it "should post an error to Hoptoad" do
@http.should_receive(:post)
- get "/test" rescue nil
+ get "/test"
end
it "should post middleware exceptions" do
@http.should_receive(:post)
- get "/nothing?test_exception=1" rescue nil
+ get "/nothing?test_exception=1"
end
it "should not post anything if non-production environment" do
ENV['RACK_ENV'] = 'development'
@http.should_not_receive(:post)
- get "/test" rescue nil
+ get "/test"
end
end
@@ -43,7 +43,8 @@ def app
end
it "should re-raise the exception" do
- lambda { get "/test" }.should raise_error(TestError)
+ get "/test"
+ last_response.errors.include?('TestError').should == true
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.