Skip to content

Commit

Permalink
Add enough code to get a rack app up and starting to be tested
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Tyler Croy committed Aug 3, 2012
1 parent 5d0992c commit 6e3ad0f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ group :development do
gem 'cucumber'
gem 'rspec'
gem 'ruby-debug19'
gem 'rack-test'
gem 'capybara'
end
9 changes: 9 additions & 0 deletions features/homepage.feature
Original file line number Diff line number Diff line change
@@ -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

8 changes: 8 additions & 0 deletions features/step_definitions/homepage_steps.rb
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions lib/saucetv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'sinatra'


module SauceTV
class Application < Sinatra::Base
end
end

0 comments on commit 6e3ad0f

Please sign in to comment.