added testing stuff, and wrote first successful test!
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# features/home.feature
|
||||
|
||||
Feature: Homepage
|
||||
|
||||
Loading the homepage is the initial starting point for this tool
|
||||
|
||||
Scenario: Homepage Loads
|
||||
Given I visit the homepage
|
||||
Then I should see "URL Shortener"
|
||||
@@ -0,0 +1,15 @@
|
||||
# GIVEN
|
||||
|
||||
Given('I visit the homepage') do
|
||||
visit '/'
|
||||
end
|
||||
|
||||
# WHEN
|
||||
|
||||
|
||||
|
||||
# THEN
|
||||
|
||||
Then('I should see {string}') do |string|
|
||||
page.should have_content "URL Shortener"
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
require_relative '../../app'
|
||||
require 'rubygems'
|
||||
require 'roda'
|
||||
require 'capybara'
|
||||
require 'capybara/dsl'
|
||||
require 'rspec'
|
||||
|
||||
|
||||
Capybara.app = App
|
||||
|
||||
include Capybara::DSL
|
||||
include RSpec::Expectations
|
||||
include RSpec::Matchers
|
||||
|
||||
Reference in New Issue
Block a user