added testing stuff, and wrote first successful test!
parent
097645cd71
commit
a34b788ff4
10
Gemfile
10
Gemfile
|
|
@ -10,8 +10,14 @@ gem "sequel", "~> 5.72"
|
|||
|
||||
gem "tilt", "~> 2.2"
|
||||
|
||||
gem "rack-test", "~> 2.1"
|
||||
gem "cucumber", "~> 9.0"
|
||||
|
||||
gem "sqlite3", "~> 1.6"
|
||||
|
||||
gem "erubi", "~> 1.12"
|
||||
|
||||
gem "capybara", "~> 3.39"
|
||||
|
||||
gem "rspec", "~> 3.12"
|
||||
|
||||
gem "cucumber", "~> 9.0"
|
||||
gem "selenium-webdriver", "~> 4.13"
|
||||
|
|
|
|||
36
Gemfile.lock
36
Gemfile.lock
|
|
@ -1,6 +1,8 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.5)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
async (2.6.4)
|
||||
console (~> 1.10)
|
||||
fiber-annotation
|
||||
|
|
@ -26,6 +28,15 @@ GEM
|
|||
bigdecimal (3.1.4)
|
||||
build-environment (1.13.0)
|
||||
builder (3.2.4)
|
||||
capybara (3.39.2)
|
||||
addressable
|
||||
matrix
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (>= 1.5, < 3.0)
|
||||
xpath (~> 3.2)
|
||||
console (1.23.2)
|
||||
fiber-annotation
|
||||
fiber-local
|
||||
|
|
@ -54,6 +65,7 @@ GEM
|
|||
cucumber-messages (21.0.1)
|
||||
cucumber-tag-expressions (4.1.0)
|
||||
diff-lcs (1.5.0)
|
||||
erubi (1.12.0)
|
||||
falcon (0.42.3)
|
||||
async
|
||||
async-container (~> 0.16.0)
|
||||
|
|
@ -73,8 +85,13 @@ GEM
|
|||
io-event (1.3.2)
|
||||
localhost (1.1.10)
|
||||
mapping (1.1.1)
|
||||
matrix (0.4.2)
|
||||
mini_mime (1.1.5)
|
||||
mini_portile2 (2.8.4)
|
||||
multi_test (1.1.0)
|
||||
nokogiri (1.15.4)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
openssl (3.1.0)
|
||||
process-metrics (0.2.1)
|
||||
console (~> 1.8)
|
||||
|
|
@ -89,9 +106,13 @@ GEM
|
|||
protocol-rack (0.2.6)
|
||||
protocol-http (~> 0.23)
|
||||
rack (>= 1.0)
|
||||
public_suffix (5.0.3)
|
||||
racc (1.7.1)
|
||||
rack (3.0.8)
|
||||
rack-test (2.1.0)
|
||||
rack (>= 1.3)
|
||||
regexp_parser (2.8.1)
|
||||
rexml (3.2.6)
|
||||
roda (3.72.0)
|
||||
rack
|
||||
rspec (3.12.0)
|
||||
|
|
@ -107,27 +128,40 @@ GEM
|
|||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-support (3.12.1)
|
||||
rubyzip (2.3.2)
|
||||
samovar (2.2.0)
|
||||
console (~> 1.0)
|
||||
mapping (~> 1.0)
|
||||
selenium-webdriver (4.13.1)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2, < 3.0)
|
||||
websocket (~> 1.0)
|
||||
sequel (5.72.0)
|
||||
bigdecimal
|
||||
sqlite3 (1.6.6)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
sys-uname (1.2.3)
|
||||
ffi (~> 1.1)
|
||||
tilt (2.2.0)
|
||||
timers (4.3.5)
|
||||
traces (0.11.1)
|
||||
websocket (1.2.10)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
|
||||
PLATFORMS
|
||||
x86_64-freebsd-13
|
||||
|
||||
DEPENDENCIES
|
||||
capybara (~> 3.39)
|
||||
cucumber (~> 9.0)
|
||||
erubi (~> 1.12)
|
||||
falcon (~> 0.42.3)
|
||||
rack-test (~> 2.1)
|
||||
roda (~> 3.72)
|
||||
rspec (~> 3.12)
|
||||
selenium-webdriver (~> 4.13)
|
||||
sequel (~> 5.72)
|
||||
sqlite3 (~> 1.6)
|
||||
tilt (~> 2.2)
|
||||
|
||||
BUNDLED WITH
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue