...poster as a file attachment to the e-mail? Can you write a RSpec test for this? In the lesson Form Models we said that we don't like to...

...method like :smtp or :sendmail which can be different for each environment. For the test environment the delivery method is set to :test, which means that new e-mails are...

When running capybara with Chrome you might start seeing frequent "no alert open" errors when trying to interact with browser...

...not part of the same network. Maybe you want to use your phone to test a web page, but are only in a guest WiFi. In the past, we often...

...local machine on port 3000. This can also be useful if you need to test with TLS, without having to jump through the hoops of creating some self-signed TLS...

rspec.info

...complicated at first, but there are use cases where it helps to write precise tests. For example it allows to add expectations on objects that will only be created when...

Also see here for further examples. Please note: Usually it is preferrable to test behaviour, not method calls. Since the behaviour of both validators is thoroughly tested in their...

Establishing a TCP connection to a SSL secured remote service is not possible using telnet or nc. Though, you can...

In tests you can write users(:alice) to look up a fixture record. The same helper is not available in the Rails console, so debugging a fixture by name means...

...You have to seed the database first with bin/rails db:fixtures:load In the test environment the records are loaded automatically by the test runner. The initializer # config/initializers/fixture_console_helpers.rb Rails.application.configure do...

...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...

...a diff between the current work and main. Can be used for Code reviews, test generation etc. pack_git_diff_head Generates a diff of uncommitted changes. Can be used...

...long strings are displayed, which sometimes means that the root cause for the failing test is buried in truncation. For example, I could not easily make out the reason for...

...the key information ("fatal: Not possible to fast-forward") is visible in the failing test output: Failure/Error: expect { crawler.pull_new_commits }.not_to raise_error expected no Exception, got #<GitLab...

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...

makandra Operations

You can use wscat: sudo apt-get install node-ws # wscat -c ws://echo.websocket.org connected (press CTRL+C to quit...

makandra Curriculum

...and following the guidelines from the referred card above. If you are debugging rspec tests, you can use rspec -b to print the full stack trace. If you encounter problems...

...Rails server's log ..or tail -f log/test.log to see the same for RSpec tests! Different debugging libraries Ruby has always had multiple gems for debugging. When you're working...

badssl.com

Website that offers lots of different kinds of HTTPS configurations, bad or good or complicated. They also offer a dashboard...

...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

relishapp.com

You can configure RSpec 3.3+ to raise an error when attempting to stub or mock a non-existing method. We...

...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...

makandra dev

Ruby 1.9.2 is very slow when loading files, especially starting Rails servers or running specs takes forever.

Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new...

If you need to find all files inside a directory that were modified in the last 24 hours you can...

puppet.com

...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...

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...

...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...

makandra dev
github.com

...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...

...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...