...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...
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...
Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new...
Takes a screenshot when you call it, or when a test fails...
...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...
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...
...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...
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...
...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...
...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...
This seems to be obvious, but you can expect Rake tasks to be called in RSpec. it 'deletes all Users...
head :bad_request end end end And change your routes + add some a test: resource :content_security_policy_report, only: :create describe ContentSecurityPolicyReportsController do describe 'POST /content_security_policy_report' do
expect(Rails.logger).to receive(:info).with('Content Security Policy Report: Mozilla/5.0 ["test"]') post '/content_security_policy_report', params: ['test'].to_json, headers: { 'Content-Type': 'application/csp-report', 'User-Agent': 'Mozilla/5.0' } expect(response...
...error), the CI job will pass MINOR: With our current setup, we lose the test coverage of the main run A fix for the passing CI despite syntax error could...
- 'if [[ $main_cucumber_run_passed =~ false ]]; then (echo -e "\033[0;33mRerunning failed tests:\033[0m"; bundle exec cucumber @tmp/failing_features.txt --strict --tags "not @real-stripe-requests" -f pretty -f...
The Javascript in operator does what Hash#has_key? does in Ruby: Return whether an object has a property.
...clients, various devices, various providers. All these things have to be thought about and tested. It’s no surprise developers don’t want to deal with this when there is...
...use plain ruby scripts, consider lib/scripts/* as folder. Keeping tasks slim For readability and testing it's easier to keep your tasks slim. We suggest to use folders inside the...
...Your code of exporting all users e.g. into a XSLX file end end end Testing should not be optional Tasks should be tested the same way as other code, even...
The french Tilt Studio built a caniuse clone for email clients. Note that while checking styling support helps using (or...
Eventually you’ll forget that you used to spend hours testing your code in a browser, and start complaining that your automated tests are taking minutes to run! You’ll...
...have intense debates with co-workers about what to test and how to test it properly. You’ll start writing the test first to expose the bug or missing feature...
Due to the way we setup Jasmine tests in our projects, you may run into various errors when Jasmine boots. Setting jasmineRequire on undefined Jasmine 4 may fail with an...
Now add the following loader to your config/webpack/environment.js: environment.loaders.prepend('fix-jasmine4-global-detection', { test: /jasmine-core\/lib\/jasmine-core\/jasmine\.js$/, use: [{ loader: 'string-replace-loader', options: { search: 'window.toString() === \'[object GjsGlobal...