From 5fd5a2c77e7063cc91253d3e3a1b7b2264d12afb Mon Sep 17 00:00:00 2001 From: "Ilya N. Zykin" Date: Sun, 29 Jan 2023 21:19:10 +0300 Subject: [PATCH] Add RSpec --- .rspec | 1 + .rubocop.yml | 1 + Gemfile | 9 +- Gemfile.lock | 47 ++++---- README.md | 15 +-- app/models/article.rb | 3 + bin/rails7startkit/helpers.rb | 11 ++ bin/rails7startkit/rspec.rb | 9 ++ bin/setup | 3 + spec/mailers/demo_spec.rb | 18 ++++ .../mailers/previews/demo_preview.rb | 6 +- spec/models/article_spec.rb | 45 ++++++++ spec/rails_helper.rb | 69 ++++++++++++ spec/spec_helper.rb | 100 ++++++++++++++++++ test/application_system_test_case.rb | 7 -- .../application_cable/connection_test.rb | 15 --- test/controllers/.keep | 0 test/controllers/demo_controller_test.rb | 10 -- test/fixtures/articles.yml | 11 -- test/fixtures/currency_rates.yml | 11 -- test/fixtures/files/.keep | 0 test/helpers/.keep | 0 test/integration/.keep | 0 test/jobs/example_job_test.rb | 9 -- test/mailers/.keep | 0 test/mailers/demo_mailer_test.rb | 9 -- test/models/.keep | 0 test/models/article_test.rb | 9 -- test/models/currency_rate_test.rb | 9 -- test/system/.keep | 0 test/test_helper.rb | 15 --- 31 files changed, 296 insertions(+), 146 deletions(-) create mode 100644 .rspec create mode 100644 bin/rails7startkit/rspec.rb create mode 100644 spec/mailers/demo_spec.rb rename test/mailers/previews/demo_mailer_preview.rb => spec/mailers/previews/demo_preview.rb (52%) create mode 100644 spec/models/article_spec.rb create mode 100644 spec/rails_helper.rb create mode 100644 spec/spec_helper.rb delete mode 100644 test/application_system_test_case.rb delete mode 100644 test/channels/application_cable/connection_test.rb delete mode 100644 test/controllers/.keep delete mode 100644 test/controllers/demo_controller_test.rb delete mode 100644 test/fixtures/articles.yml delete mode 100644 test/fixtures/currency_rates.yml delete mode 100644 test/fixtures/files/.keep delete mode 100644 test/helpers/.keep delete mode 100644 test/integration/.keep delete mode 100644 test/jobs/example_job_test.rb delete mode 100644 test/mailers/.keep delete mode 100644 test/mailers/demo_mailer_test.rb delete mode 100644 test/models/.keep delete mode 100644 test/models/article_test.rb delete mode 100644 test/models/currency_rate_test.rb delete mode 100644 test/system/.keep delete mode 100644 test/test_helper.rb diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..c99d2e7 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--require spec_helper diff --git a/.rubocop.yml b/.rubocop.yml index 138d038..a02e221 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -65,5 +65,6 @@ Style/GlobalVars: - bin/rails7startkit/helpers.rb - config/initializers/_REDIS.rb Metrics/BlockLength: + IgnoredMethods: ['describe', 'context'] Exclude: - config/environments/development.rb diff --git a/Gemfile b/Gemfile index 747dd70..9b8e149 100644 --- a/Gemfile +++ b/Gemfile @@ -46,6 +46,9 @@ gem "kaminari", "1.2.2" gem "whenever", "1.0.0", require: false group :development, :test do + # RSpec testing + gem "rspec-rails", "6.0.1" + # Fake data for development and testing gem "faker", "3.1.0" @@ -108,7 +111,7 @@ end group :test do # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara", "3.38.0" - gem "selenium-webdriver", "4.7.1" - gem "webdrivers", "5.2.0" + # gem "capybara", "3.38.0" + # gem "selenium-webdriver", "4.7.1" + # gem "webdrivers", "5.2.0" end diff --git a/Gemfile.lock b/Gemfile.lock index b46bd95..ea69a28 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,22 +74,11 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) bindex (0.8.1) bootsnap (1.15.0) msgpack (~> 1.2) builder (3.2.4) - capybara (3.38.0) - 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) chewy (7.2.7) activesupport (>= 5.2) elasticsearch (>= 7.12.0, < 7.14.0) @@ -101,6 +90,7 @@ GEM date (3.3.3) debug (1.7.1) deep_merge (1.2.2) + diff-lcs (1.5.0) dry-configurable (1.0.1) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) @@ -200,7 +190,6 @@ GEM net-pop net-smtp marcel (1.0.2) - matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) mini_portile2 (2.8.1) @@ -225,7 +214,6 @@ GEM parser (3.2.0.0) ast (~> 2.4.1) pg (1.4.5) - public_suffix (5.0.1) puma (5.6.5) nio4r (~> 2.0) racc (1.6.2) @@ -266,6 +254,23 @@ GEM connection_pool regexp_parser (2.6.1) rexml (3.2.5) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) + rspec-support (3.12.0) rubocop (1.44.1) json (~> 2.3) parallel (~> 1.10) @@ -284,14 +289,9 @@ GEM rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) sanitize (6.0.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - selenium-webdriver (4.7.1) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) sidekiq (7.0.2) concurrent-ruby (< 2) connection_pool (>= 2.3.0) @@ -320,18 +320,11 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.2.0) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) - websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) whenever (1.0.0) chronic (>= 0.6.3) - xpath (3.2.0) - nokogiri (~> 1.8) zeitwerk (2.6.6) PLATFORMS @@ -340,7 +333,6 @@ PLATFORMS DEPENDENCIES bootsnap (= 1.15.0) - capybara (= 3.38.0) chewy (= 7.2.7) config (= 4.1.0)! debug (= 1.7.1) @@ -352,16 +344,15 @@ DEPENDENCIES puma (= 5.6.5) rails (= 7.0.4.2) redis (= 5.0.5) + rspec-rails (= 6.0.1) rubocop-rails (= 2.17.4) sanitize (= 6.0.0) - selenium-webdriver (= 4.7.1) sidekiq (= 7.0.2) sprockets-rails (= 3.4.2) stimulus-rails (= 1.2.1) turbo-rails (= 1.3.2) tzinfo-data web-console (= 4.2.0) - webdrivers (= 5.2.0) whenever (= 1.0.0) RUBY VERSION diff --git a/README.md b/README.md index 464b39c..7177b41 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,11 @@ Rails 7 Application is Ready in Minutes! Rubocop Ruby static code analyzer (a.k.a. linter) and formatter. + + rspec + RSpec + Testing Framework for Rails + @@ -152,11 +157,6 @@ What I'm going to add... Devise and Action Mailer Sending emails for account confirmations - - rspec - RSpec - Testing Framework for Rails - @@ -209,8 +209,9 @@ What was done: 10. Launching Rails App with Puma 11. Launching Sidekiq 12. Rubocop is Checking -13. Visit Rails App: http://localhost:3000 -14. Visit Mail Service: http://localhost:1080 +13. RSpec is Checking +14. Visit Rails App: http://localhost:3000 +15. Visit Mail Service: http://localhost:1080 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Welcome to RAILS 7! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/app/models/article.rb b/app/models/article.rb index ad5b709..4bfd7c3 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -12,6 +12,9 @@ class Article < ApplicationRecord # ElasticSearch / Chewy update_index('articles') { self } + # Validations + validates :title, presence: true, length: { minimum: 3 } + # Kaminari. Pagination paginates_per 3 diff --git a/bin/rails7startkit/helpers.rb b/bin/rails7startkit/helpers.rb index d7a54d1..4d6e757 100755 --- a/bin/rails7startkit/helpers.rb +++ b/bin/rails7startkit/helpers.rb @@ -1,5 +1,16 @@ # frozen_string_literal: true +require_relative './common' +require_relative './docker' +require_relative './chewy' +require_relative './sidekiq' +require_relative './cron' +require_relative './whenever' +require_relative './rails' +require_relative './puma' +require_relative './rubocop' +require_relative './rspec' + DELAY = 3 ENV_NAME = ENV.fetch('RAILS_ENV', 'development') diff --git a/bin/rails7startkit/rspec.rb b/bin/rails7startkit/rspec.rb new file mode 100644 index 0000000..5917cae --- /dev/null +++ b/bin/rails7startkit/rspec.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Rails7StartKit + class << self + def rspec + container_bash_exec('rails', 'rspec -f documentation') + end + end +end diff --git a/bin/setup b/bin/setup index 0616e1c..04e84a9 100755 --- a/bin/setup +++ b/bin/setup @@ -65,6 +65,9 @@ module Rails7StartKit step_info 'Rubocop is Checking' rubocop + step_info "RSpec is Checking" + rspec + step_info 'Visit Rails App: http://localhost:3000' step_info 'Visit Mail Service: http://localhost:1080' diff --git a/spec/mailers/demo_spec.rb b/spec/mailers/demo_spec.rb new file mode 100644 index 0000000..5ece2ca --- /dev/null +++ b/spec/mailers/demo_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe DemoMailer, type: :mailer do + let(:mail) { DemoMailer.welcome_email } + + it 'renders the headers' do + expect(mail.subject).to eq('Welcome to Rails 7. StartKit') + expect(mail.to).to eq(['test@test.com']) + expect(mail.from).to eq(['demo@rails7startkit.com']) + end + + it 'renders the body' do + expect(mail.body.encoded).to match('Welcome to Rails7. StartKit') + expect(mail.body.encoded).to match('Thanks for using this project!') + end +end diff --git a/test/mailers/previews/demo_mailer_preview.rb b/spec/mailers/previews/demo_preview.rb similarity index 52% rename from test/mailers/previews/demo_mailer_preview.rb rename to spec/mailers/previews/demo_preview.rb index 10b36eb..dc26564 100644 --- a/test/mailers/previews/demo_mailer_preview.rb +++ b/spec/mailers/previews/demo_preview.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -# Preview all emails at http://localhost:3000/rails/mailers/demo_mailer -class DemoMailerPreview < ActionMailer::Preview - # Accessible from http://localhost:3000/rails/mailers/demo_mailer/welcome_email +# Preview all emails at http://localhost:3000/rails/mailers/demo +class DemoPreview < ActionMailer::Preview + # http://localhost:3000/rails/mailers/demo/welcome_email def welcome_email DemoMailer.welcome_email end diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb new file mode 100644 index 0000000..9f001d5 --- /dev/null +++ b/spec/models/article_spec.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Article, type: :model do + it 'creates an article' do + Article.create( + title: 'ABC', + content_raw: 'test content' + ) + expect(Article.count).to eq(1) + end + + it 'processes content_raw in content' do + article = Article.create( + title: 'Article title', + content_raw: '

test content

' + ) + expect(article.content).to eq('test content') + end + + context 'negative cases' do + it 'fails if title is of whitespaces ' do + article = Article.create( + title: ' ', + content_raw: '

test content

' + ) + + expect( + article.errors.messages[:title] + ).to eq(["can't be blank"]) + end + + it 'fails if article title length less than 3 symbols' do + article = Article.create( + title: 'AB', + content_raw: 'test content' + ) + + expect( + article.errors.messages[:title] + ).to eq(['is too short (minimum is 3 characters)']) + end + end +end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 0000000..21cc644 --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# This file is copied to spec/ when you run 'rails generate rspec:install' +require 'spec_helper' +ENV['RAILS_ENV'] = 'test' +require_relative '../config/environment' +# Prevent database truncation if the environment is production +abort('The Rails environment is running in production mode!') if Rails.env.production? +require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# +# The following line is provided for convenience purposes. It has the downside +# of increasing the boot-up time by auto-requiring all files in the support +# directory. Alternatively, in the individual `*_spec.rb` files, manually +# require only the support files necessary. +# +# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f } + +# Checks for pending migrations and applies them before tests are run. +# If you are not using ActiveRecord, you can remove these lines. +begin + ActiveRecord::Migration.maintain_test_schema! +rescue ActiveRecord::PendingMigrationError => e + abort e.to_s.strip +end +RSpec.configure do |config| + config.before(:suite) do + Chewy.strategy(:bypass) + end + + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = Rails.root.join('spec/fixtures') + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + # You can uncomment this line to turn off ActiveRecord support entirely. + # config.use_active_record = false + + # RSpec Rails can automatically mix in different behaviours to your tests + # based on their file location, for example enabling you to call `get` and + # `post` in specs under `spec/controllers`. + # + # You can disable this behaviour by removing the line below, and instead + # explicitly tag your specs with their type, e.g.: + # + # RSpec.describe UsersController, type: :controller do + # # ... + # end + # + # The different available types are documented in the features, such as in + # https://relishapp.com/rspec/rspec-rails/docs + config.infer_spec_type_from_file_location! + + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..21903b7 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# rails generate rspec:install +# +# This file was generated by the `rails generate rspec:install` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need +# it. +# +# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + config.before(:suite) do + Chewy.strategy(:bypass) + end + + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end + + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end + + # This option will default to `:apply_to_host_groups` in RSpec 4 (and will + # have no way to turn it off -- the option exists only for backwards + # compatibility in RSpec 3). It causes shared context metadata to be + # inherited by the metadata hash of host groups and examples, rather than + # triggering implicit auto-inclusion in groups with matching metadata. + config.shared_context_metadata_behavior = :apply_to_host_groups + + # The settings below are suggested to provide a good initial experience + # with RSpec, but feel free to customize to your heart's content. + # # This allows you to limit a spec run to individual examples or groups + # # you care about by tagging them with `:focus` metadata. When nothing + # # is tagged with `:focus`, all examples get run. RSpec also provides + # # aliases for `it`, `describe`, and `context` that include `:focus` + # # metadata: `fit`, `fdescribe` and `fcontext`, respectively. + # config.filter_run_when_matching :focus + # + # # Allows RSpec to persist some state between runs in order to support + # # the `--only-failures` and `--next-failure` CLI options. We recommend + # # you configure your source control system to ignore this file. + # config.example_status_persistence_file_path = "spec/examples.txt" + # + # # Limits the available syntax to the non-monkey patched syntax that is + # # recommended. For more details, see: + # # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode + # config.disable_monkey_patching! + # + # # Many RSpec users commonly either run the entire suite or an individual + # # file, and it's useful to allow more verbose output when running an + # # individual spec file. + # if config.files_to_run.one? + # # Use the documentation formatter for detailed output, + # # unless a formatter has already been configured + # # (e.g. via a command-line flag). + # config.default_formatter = "doc" + # end + # + # # Print the 10 slowest examples and example groups at the + # # end of the spec run, to help surface which specs are running + # # particularly slow. + # config.profile_examples = 10 + # + # # Run specs in random order to surface order dependencies. If you find an + # # order dependency and want to debug it, you can fix the order by providing + # # the seed, which is printed after each run. + # # --seed 1234 + # config.order = :random + # + # # Seed global randomization in this process using the `--seed` CLI option. + # # Setting this allows you to use `--seed` to deterministically reproduce + # # test failures related to randomization by passing the same `--seed` value + # # as the one that triggered the failure. + # Kernel.srand config.seed +end diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb deleted file mode 100644 index 652febb..0000000 --- a/test/application_system_test_case.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] -end diff --git a/test/channels/application_cable/connection_test.rb b/test/channels/application_cable/connection_test.rb deleted file mode 100644 index 4aee9b3..0000000 --- a/test/channels/application_cable/connection_test.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module ApplicationCable - class ConnectionTest < ActionCable::Connection::TestCase - # test "connects with cookies" do - # cookies.signed[:user_id] = 42 - # - # connect - # - # assert_equal connection.user_id, "42" - # end - end -end diff --git a/test/controllers/.keep b/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/controllers/demo_controller_test.rb b/test/controllers/demo_controller_test.rb deleted file mode 100644 index 69a7ee9..0000000 --- a/test/controllers/demo_controller_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class DemoControllerTest < ActionDispatch::IntegrationTest - test 'should get index' do - get root_url - assert_response :success - end -end diff --git a/test/fixtures/articles.yml b/test/fixtures/articles.yml deleted file mode 100644 index 75e1cda..0000000 --- a/test/fixtures/articles.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - title: MyString - content: MyText - status: MyString - -two: - title: MyString - content: MyText - status: MyString diff --git a/test/fixtures/currency_rates.yml b/test/fixtures/currency_rates.yml deleted file mode 100644 index 4619a1a..0000000 --- a/test/fixtures/currency_rates.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - from: MyString - to: MyString - rate: 1.5 - -two: - from: MyString - to: MyString - rate: 1.5 diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/helpers/.keep b/test/helpers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/integration/.keep b/test/integration/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/jobs/example_job_test.rb b/test/jobs/example_job_test.rb deleted file mode 100644 index 53a69e2..0000000 --- a/test/jobs/example_job_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class ExampleJobTest < ActiveJob::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/mailers/.keep b/test/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/mailers/demo_mailer_test.rb b/test/mailers/demo_mailer_test.rb deleted file mode 100644 index a3b81b7..0000000 --- a/test/mailers/demo_mailer_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class DemoMailerTest < ActionMailer::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/.keep b/test/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/models/article_test.rb b/test/models/article_test.rb deleted file mode 100644 index cfa5eba..0000000 --- a/test/models/article_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class ArticleTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/currency_rate_test.rb b/test/models/currency_rate_test.rb deleted file mode 100644 index 6eb8a06..0000000 --- a/test/models/currency_rate_test.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class CurrencyRateTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/system/.keep b/test/system/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index 8e820b2..0000000 --- a/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -ENV["RAILS_ENV"] ||= "test" -require_relative "../config/environment" -require "rails/test_help" - -class ActiveSupport::TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end