Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
11 changes: 6 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.0'

gem 'simplecov', require: false, group: :test
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.1'
# Use sqlite3 as the database for Active Record


# DBS
# mysql
# postgresql
gem 'sqlite3'
gem 'pg'
# gem 'sqlite3'
# oracle
# sqlserver
# jdbcmysql
Expand All @@ -20,7 +21,7 @@ gem 'sqlite3'

# TestFrameworks
# minutest
# rspec
gem "rspec-rails"
# cucumber
# test-unit
# selenium
Expand All @@ -35,6 +36,7 @@ gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'rubocop', require: false
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
Expand Down Expand Up @@ -65,7 +67,6 @@ end
gem 'rexml'



group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 3.26'
Expand Down
50 changes: 48 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GEM
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.1)
bindex (0.8.1)
bootsnap (1.5.1)
msgpack (~> 1.0)
Expand All @@ -78,6 +79,8 @@ GEM
childprocess (3.0.0)
concurrent-ruby (1.1.7)
crass (1.0.6)
diff-lcs (1.4.4)
docile (1.3.5)
erubi (1.10.0)
ffi (1.14.2)
globalid (0.4.2)
Expand All @@ -104,6 +107,10 @@ GEM
nio4r (2.5.4)
nokogiri (1.11.1-x86_64-darwin)
racc (~> 1.4)
pg (1.2.3)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
public_suffix (4.0.6)
puma (5.1.1)
nio4r (~> 2.0)
Expand Down Expand Up @@ -141,12 +148,42 @@ GEM
method_source
rake (>= 0.8.7)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.8.2)
rexml (3.2.4)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.1)
rubocop (1.8.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.0)
parser (>= 2.7.1.5)
ruby-progressbar (1.11.0)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
Expand All @@ -162,6 +199,12 @@ GEM
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (2.3.1)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
spring (2.1.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
Expand All @@ -170,14 +213,14 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.0.1)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
web-console (4.1.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand Down Expand Up @@ -208,14 +251,17 @@ DEPENDENCIES
capybara (>= 3.26)
jbuilder (~> 2.7)
listen (~> 3.3)
pg
puma (~> 5.0)
rack-mini-profiler (~> 2.0)
rails (~> 6.1.1)
rexml
rspec-rails
rubocop
sass-rails (>= 6)
selenium-webdriver
simplecov
spring
sqlite3
turbolinks (~> 5)
tzinfo-data
web-console (>= 4.1.0)
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Base Branches
main
rspec
failed
success
error
[x] rspec
[x] failed
[x] success
[x] error

rubocop
failed
success
error
[ ] rubocop
[ ] failed
[ ] success
[ ] error

simplecov
failed
success
[ ] simplecov
[ ] failed
[ ] success

pg
mysql
mongo
sqlite3
[x] pg
[ ] mysql
[ ] mongo
[ ] sqlite3

# Test Branches
rspec_failed + pg
rspec_success + pg
rspec_failed + pg
[x] rspec_failed_pg
[x] rspec_success_pg
[x] rspec_failed_pg

rspec_failed + pg + simplecov
rspec_success + pg + simplecov
rspec_failed + pg + simplecov
[ ] rspec_failed_pg_simplecov
[ ] rspec_success_pg_simplecov
[ ] rspec_failed_pg_simplecov

rspec_failed + pg + simplecov + rubocop
rspec_success + pg + simplecov + rubocop
rspec_failed + pg + simplecov + rubocop
[ ] rspec_failed_pg_simplecov_rubocop
[ ] rspec_success_pg_simplecov_rubocop
[ ] rspec_failed_pg_simplecov_rubocop
8 changes: 4 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
adapter: postgresql
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000

development:
<<: *default
database: db/development.sqlite3
database: development_rails_6

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
database: test_rails_6

production:
<<: *default
database: db/production.sqlite3
database: development_rails_6
39 changes: 39 additions & 0 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions spec/models/city_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'rails_helper'

RSpec.describe City do
it 'belongs to country' do
sleep 1 + rand
end

it 'has many neighbourhoods' do
sleep 1 + rand
end

it 'validates name' do
sleep 1 + rand
end

it 'has people living in' do
sleep 1 + rand
end
end
17 changes: 17 additions & 0 deletions spec/models/company_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'rails_helper'

RSpec.describe Company do
describe '#generate_invoice' do
it 'generates pdf' do
sleep 1 + rand
end

it 'total is the sum of all lines' do
sleep 1 + rand
end

it 'it starts with non paid' do
sleep 1 + rand
end
end
end
22 changes: 22 additions & 0 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'rails_helper'

RSpec.describe User do
describe "#generate_jwt" do
it "generates a valid jwt with a payload of id" do
sleep 1 + rand
end
end

describe "#personal_data" do
it "returns data of first_name, last_name, and email" do
sleep 1 + rand
end
end

describe "#subscription" do
it "returns the associated subscription" do
sleep 1 + rand
end
end
end

Loading