Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sinatra-skeleton
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Ernesto Suarez
sinatra-skeleton
Commits
5aa8aacd
Commit
5aa8aacd
authored
May 18, 2016
by
Vaz Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rspec, capybara
parent
7387e804
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
0 deletions
+74
-0
.rspec
.rspec
+1
-0
Gemfile
Gemfile
+6
-0
Gemfile.lock
Gemfile.lock
+37
-0
spec_helper.rb
spec/spec_helper.rb
+30
-0
No files found.
.rspec
0 → 100644
View file @
5aa8aacd
--format documentation --color
Gemfile
View file @
5aa8aacd
...
@@ -16,3 +16,9 @@ group :development, :test do
...
@@ -16,3 +16,9 @@ group :development, :test do
gem
'
shotgun
'
gem
'
shotgun
'
gem
'
sqlite3
'
gem
'
sqlite3
'
end
end
group
:test
do
gem
'
rspec
'
gem
'
capybara
'
gem
'
database_cleaner
'
end
Gemfile.lock
View file @
5aa8aacd
...
@@ -14,16 +14,32 @@ GEM
...
@@ -14,16 +14,32 @@ GEM
minitest (~> 5.1)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
tzinfo (~> 1.1)
addressable (2.4.0)
arel (6.0.3)
arel (6.0.3)
backports (3.6.7)
backports (3.6.7)
bond (0.5.1)
bond (0.5.1)
builder (3.2.2)
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)
coderay (1.1.0)
database_cleaner (1.3.0)
diff-lcs (1.2.5)
i18n (0.7.0)
i18n (0.7.0)
json (1.8.3)
json (1.8.3)
method_source (0.8.2)
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)
minitest (5.8.3)
multi_json (1.11.2)
multi_json (1.11.2)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
pry (0.10.3)
pry (0.10.3)
coderay (~> 1.1.0)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
method_source (~> 0.8.1)
...
@@ -43,6 +59,19 @@ GEM
...
@@ -43,6 +59,19 @@ GEM
rack (>= 1.0)
rack (>= 1.0)
rack-test (~> 0.6.2)
rack-test (~> 0.6.2)
ripl (>= 0.7.0)
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)
shotgun (0.9.1)
rack (>= 1.0)
rack (>= 1.0)
sinatra (1.4.6)
sinatra (1.4.6)
...
@@ -70,18 +99,26 @@ GEM
...
@@ -70,18 +99,26 @@ GEM
sinatra (>= 1.2.1)
sinatra (>= 1.2.1)
tzinfo (1.2.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)
thread_safe (~> 0.1)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
PLATFORMS
ruby
ruby
DEPENDENCIES
DEPENDENCIES
activesupport
activesupport
capybara
database_cleaner
pry
pry
puma
puma
rake
rake
rspec
shotgun
shotgun
sinatra
sinatra
sinatra-activerecord
sinatra-activerecord
sinatra-contrib
sinatra-contrib
sqlite3
sqlite3
tux
tux
BUNDLED WITH
1.11.2
spec/spec_helper.rb
0 → 100644
View file @
5aa8aacd
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment