Permalink
Browse files

Add enough code to get a rack app up and starting to be tested

  • Loading branch information...
1 parent 5d0992c commit 6e3ad0fb016476beaafab974b9a891d5e9508123 @rtyler committed Aug 3, 2012
Showing with 35 additions and 0 deletions.
  1. +2 −0 Gemfile
  2. +9 −0 features/homepage.feature
  3. +8 −0 features/step_definitions/homepage_steps.rb
  4. +9 −0 features/support/env.rb
  5. +7 −0 lib/saucetv.rb
View
@@ -8,4 +8,6 @@ group :development do
gem 'cucumber'
gem 'rspec'
gem 'ruby-debug19'
+ gem 'rack-test'
+ gem 'capybara'
end
@@ -0,0 +1,9 @@
+Feature: SauceLabs.tv home page
+ In order to understand WTF saucelabs.tv is
+ As a regular user
+ The home page should inform me about wtf this thing is
+
+ Scenario: Un-authenticated access to home page
+ When I visit the home page
+ Then I should be welcomed
+
@@ -0,0 +1,8 @@
+When /^I visit the home page$/ do
+ visit '/'
+end
+
+Then /^I should be welcomed$/ do
+ pending # express the regexp above with the code you wish you had
+end
+
View
@@ -0,0 +1,9 @@
+require 'capybara'
+require 'capybara/cucumber'
+require 'rack/test'
+
+$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')
+
+require 'saucetv'
+
+Capybara.app = SauceTV::Application
View
@@ -0,0 +1,7 @@
+require 'sinatra'
+
+
+module SauceTV
+ class Application < Sinatra::Base
+ end
+end

0 comments on commit 6e3ad0f

Please sign in to comment.