Permalink
Browse files

setup for RSpec/Capybara/RackTest

  • Loading branch information...
1 parent 468f5f5 commit c376b51e89cb47fbd2d134cc4d89a604b81a3f31 @davidtrogers davidtrogers committed Apr 19, 2012
Showing with 41 additions and 0 deletions.
  1. +2 −0 Gemfile
  2. +25 −0 Gemfile.lock
  3. +14 −0 spec/spec_helper.rb
View
@@ -5,3 +5,5 @@ gem "haml"
gem "rqrcode"
gem "shotgun"
gem "rspec"
+gem "nokogiri"
+gem "capybara"
View
@@ -1,11 +1,26 @@
GEM
remote: http://rubygems.org/
specs:
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.1)
+ ffi (~> 1.0.6)
diff-lcs (1.1.3)
+ ffi (1.0.11)
haml (3.1.4)
+ mime-types (1.18)
+ multi_json (1.2.0)
+ nokogiri (1.5.2)
rack (1.4.1)
rack-protection (1.2.0)
rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
rqrcode (0.4.2)
rspec (2.9.0)
rspec-core (~> 2.9.0)
@@ -15,19 +30,29 @@ GEM
rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
+ rubyzip (0.9.6.1)
+ selenium-webdriver (2.20.0)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ multi_json (~> 1.0)
+ rubyzip
shotgun (0.9)
rack (>= 1.0)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
tilt (1.3.3)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
+ capybara
haml
+ nokogiri
rqrcode
rspec
shotgun
View
@@ -0,0 +1,14 @@
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'app'))
+require 'capybara/rspec'
+require 'rack/test'
+require 'nokogiri'
+
+Capybara.app = Sinatra::Application
+
+RSpec.configure do |config|
+ config.include Rack::Test::Methods
+end
+
+def app
+ Sinatra::Application
+end

0 comments on commit c376b51

Please sign in to comment.