Skip to content
Browse files

capybara can take care of starting the app all by itself

  • Loading branch information...
1 parent 4c67a30 commit 6299bf1df893c57123045767ddcc09d125a0cb9b @artemave committed May 6, 2012
Showing with 52 additions and 52 deletions.
  1. +44 −42 Gemfile.lock
  2. +4 −8 README.md
  3. +4 −2 features/support/env.rb
  4. 0 tweet_checker → tweet_checker.rb
View
86 Gemfile.lock
@@ -1,22 +1,22 @@
GEM
remote: http://rubygems.org/
specs:
- activemodel (3.1.3)
- activesupport (= 3.1.3)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- arel (~> 2.2.1)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- activesupport (3.1.3)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
multi_json (~> 1.0)
- addressable (2.2.7)
- arel (2.2.1)
+ addressable (2.2.8)
+ arel (3.0.2)
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
@@ -25,72 +25,74 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.3.1)
+ childprocess (0.3.2)
ffi (~> 1.0.6)
- cucumber (1.1.7)
+ cucumber (1.1.9)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
- gherkin (~> 2.8.0)
+ gherkin (~> 2.9.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
daemons (1.1.8)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
ffi (1.0.11)
- gherkin (2.8.0)
+ gherkin (2.9.3)
json (>= 1.4.6)
haml (3.1.4)
i18n (0.6.0)
- json (1.6.5)
- json_pure (1.6.5)
- launchy (2.0.5)
+ json (1.7.0)
+ launchy (2.1.0)
addressable (~> 2.2.6)
- mime-types (1.17.2)
- multi_json (1.1.0)
- nokogiri (1.5.0)
+ libwebsocket (0.1.3)
+ addressable
+ mime-types (1.18)
+ multi_json (1.3.4)
+ nokogiri (1.5.2)
rack (1.4.1)
rack-protection (1.2.0)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rest-assured (1.1.0)
- activerecord (~> 3.1.0)
- activeresource (~> 3.1.0)
+ rest-assured (1.1.5)
+ activerecord (~> 3.2.0)
+ activeresource (~> 3.2.0)
childprocess (~> 0.3.0)
haml (>= 3.1.3)
- sinatra (>= 1.3.2)
+ sinatra (~> 1.3.2)
sinatra-flash
rest-client (1.6.7)
mime-types (>= 1.16)
- rspec (2.8.0)
- rspec-core (~> 2.8.0)
- rspec-expectations (~> 2.8.0)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
- rubyzip (0.9.6.1)
- selenium-webdriver (2.13.0)
- childprocess (>= 0.2.1)
- ffi (~> 1.0.9)
- json_pure
+ rspec (2.10.0)
+ rspec-core (~> 2.10.0)
+ rspec-expectations (~> 2.10.0)
+ rspec-mocks (~> 2.10.0)
+ rspec-core (2.10.0)
+ rspec-expectations (2.10.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.10.1)
+ rubyzip (0.9.8)
+ selenium-webdriver (2.21.2)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
rubyzip
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
- sqlite3 (1.3.5)
+ sqlite3 (1.3.6)
term-ansicolor (1.0.7)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.3)
- tzinfo (0.3.31)
+ tzinfo (0.3.33)
xpath (0.1.4)
nokogiri (~> 1.3)
View
12 README.md
@@ -1,6 +1,6 @@
## REST Assured example
-Sample app that uses [REST-assured](https://github.com/BBC/REST-assured) in its integration testing (cucumber). It implements a page where user can query twitter for popular tweets that match search term.
+Sample app that uses [REST-assured](https://github.com/BBC/REST-assured) in its integration testing (cucumber). It is a page where user can query twitter for popular tweets that match search term.
## Usage
@@ -10,16 +10,12 @@ Install app:
$ git clone git://github.com/artemave/REST-assured-example.git
$ cd REST-assured-example
- $ bundle install # gem install bundler if it is not there yet
+ $ bundle install # `gem install bundler` if it is not there yet
$ ./tweet_checker # then visit http://localhost:4567/popular_tweets
-Run app with twitter stubbed out:
-
- $ TWITTER_HOST=http://localhost:4578 ./tweet_checker
+Run tests:
-Then run tests:
-
- $ bundle exec cucumber # in separate shell
+ $ bundle exec cucumber
## Author
View
6 features/support/env.rb
@@ -3,10 +3,12 @@
require 'rest-client'
require 'rest-assured'
+ENV['TWITTER_HOST'] = 'http://localhost:4578'
+require_relative '../../tweet_checker'
+
Capybara.configure do |config|
config.default_driver = :selenium
- config.run_server = false
- config.app_host = "http://localhost:4567"
+ config.app = Sinatra::Application.new
end
World(Capybara)
View
0 tweet_checker → tweet_checker.rb 100755 → 100644
File renamed without changes.

0 comments on commit 6299bf1

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