...server before the new version can be used. That also means you can't test functions in a different puppet environment. And also if you have changed functions in a...
...different puppet environment (where you e.g. test some new module version) and this environment runs at first after a puppetserver restart, you have this changed functions also in your production...
...simply replace %br with %br>< for that. When you are done, use a spam test service like mail-tester.com to check if all is well. Note that premailer-rails can do...
...its effects on forms, views, lookups and login. You pick the cheapest kind of test that proves each behavior instead of writing an end-to-end test for everything.
Soft-deletable users As an exercise, make users soft-deletable in MovieDB. Write tests to ensure the following behaviors: Soft-deleted users are no longer visible on the users...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has happened. We used to bend over backwards to avoid touching...
Today we would rather make a few database queries than have a fragile test full of stubs. Example Let's say your User model creates a first Project on...
...the command geordi migrate to migrate your databases and to prepare them before running tests. The abbrevation geordi m works as well. It will run rake db:migrate if parallel...
...tests does not exist in your Gemfile Otherwise it runs b rake db:migrate and then executes b rake parallel:prepare if parallel_tests was found in your Gemfile...
...data out of your database. This lesson covers Rails' built-in validations, how to test them, and how to show helpful error messages in your forms. Important
...can write a custom validation for a rule that spans several attributes. You can test a single validation in isolation, e.g. with Shoulda matchers. You can show validation errors next...
Using this gem, whenever a Capybara test in Cucumber, Rspec or Minitest fails, the HTML for the failed page and a screenshot (when using capybara-webkit, Selenium or poltergeist) is...
Takes a screenshot when you call it, or when a test fails...
...T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] test I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] more
...T06:22:17.484221 #2698200] INFO -- : [6e047fb3-05df-4df7-808e-efa9fcd05f87] test I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [6e047fb3-05df-4df7-808e-efa9fcd05f87] more
...giving examples for high level APIs of your imagened class design or using an test as specification can also be a highly meaningful input for an LLM on what to...
...model is crucial, as not all excel at code editing. The aider polyglot leaderboard tests models across multiple languages on challenging problems, ensuring reliable evaluation. By focusing on real-world...
Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new...
...case-by-case basis. Integrating Reek in an existing project Add: gem "reek", group: [:test, :development] To run Reek on your Rails project: $ bundle exec reek app lib config test...
...consider the following configuration: reek: stage: lint script: - bundle exec reek app lib config test allow_failure: true # a reek failure will only create a "warning" and not block a...
...which records a user sees, which transitions they may trigger — to the state. You test state-dependent behavior at the right level: end-to-end for the business process, unit...
...tests for transitions and validations, with factory traits for records in a given state. You know that multi-step "wizard" forms are a common use of state machines. Resources
A comprehensive script to convert test suites from RSpec 2 to RSpec 3. This converts more than should/expect syntax...
...for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites. Note that rcov won't ever have support for Ruby 1.9, you're supposed...
Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages production and staging. Whenever you create custom groups in your...
...deploy, add the following to config/deploy/production.rb and config/deploy/staging.rb respectively: set :bundle_without, %w[development test cucumber deploy].join(' ') Be aware, that gems that belong to two groups, are only excluded...
...environment yet, which Rails 5 enforces. If this error occurs while migrating your parallel test databases, make sure to update the parallel_tests gem first: current versions fix this. If...
...you're still using Cucumber < v3, the latest version of parallel_tests will be...
Nice tutorial about packaging Ruby bindings to your API in a Ruby gem, with tests using VCR casettes...
Enter the hostname of a server to test it for CVE...
Requestb.in is a webservice that gives you a temporary URL you can use to test request. The page will automatically record and display the latest web request made to it...
Erstelle ein SNS Topic und erstelle eine E-Mail Subscription zu dir. Teste ob das Topic funktioniert, indem du mit der AWS-CLI eine Nachricht published.
...eine Rule einrichtest, die du leicht brechen und wieder reparieren kannst, z.B. restricted-ssh. Teste ob du die Regel brechen kannst. Richte AWS Config so ein, dass eine Benachrichtigung an...
...want to fully control error responses in production through the default PublicExceptions exceptions app. Testing exceptions Exception handling behaves differently in the test environment: since Rails 7.2 config.action_dispatch.show_exceptions defaults...
...decide whether to re-raise or render: :none re-raises every exception (the old test default, which is why expect { }.to raise_exception used to pass). :rescuable renders the mapped...
...that callback does or which type of callback it is). This is how we test whether the callback function (here it is named :my_method) is called when a new...
...that the behaviour of the callback function :my_method does not happen in the test, as if the callback function is not executed in the test. However, since the test...
...add gems jsbundling-rails and foreman to your Gemfile: gem 'jsbundling-rails' group :development, :test do gem 'foreman' # ... end bundle install run bin/rails javascript:install:esbuild in a console to...
...your Gemfile that are no longer necessary, e.g. sass-rails or uglifier run your test suite and make sure that all tests succeed. optional: Make your application show esbuild errors...