Commit 5aa8aacd authored by Vaz Allen's avatar Vaz Allen

Add rspec, capybara

parent 7387e804
--format documentation --color
......@@ -16,3 +16,9 @@ group :development, :test do
gem 'shotgun'
gem 'sqlite3'
end
group :test do
gem 'rspec'
gem 'capybara'
gem 'database_cleaner'
end
......@@ -14,16 +14,32 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
arel (6.0.3)
backports (3.6.7)
bond (0.5.1)
builder (3.2.2)
capybara (2.7.1)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coderay (1.1.0)
database_cleaner (1.3.0)
diff-lcs (1.2.5)
i18n (0.7.0)
json (1.8.3)
method_source (0.8.2)
mime-types (3.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_portile2 (2.0.0)
minitest (5.8.3)
multi_json (1.11.2)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
......@@ -43,6 +59,19 @@ GEM
rack (>= 1.0)
rack-test (~> 0.6.2)
ripl (>= 0.7.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
shotgun (0.9.1)
rack (>= 1.0)
sinatra (1.4.6)
......@@ -70,18 +99,26 @@ GEM
sinatra (>= 1.2.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
activesupport
capybara
database_cleaner
pry
puma
rake
rspec
shotgun
sinatra
sinatra-activerecord
sinatra-contrib
sqlite3
tux
BUNDLED WITH
1.11.2
ENV['RACK_ENV'] ||= 'test'
require_relative '../config/environment'
require 'rspec'
require 'capybara/rspec'
require 'database_cleaner'
Capybara.app = Sinatra::Application
RSpec.configure do |config|
# make the capybara methods available in our tests
config.include Capybara::DSL
# All of the following just ensures the database is wiped
# before every single test
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment