a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus the same as -M50%. Similarly, -M05 is the same as -M5...
Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps
tl;dr Since Rails 6.1+ you can use .compact_blank or .compact_blank! to remove blank values from collections (e.g...
To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...
...hide gems from the backtrace. In such cases, log_subscriber.rb is the inner-most (i.e. "best") source in the backtrace. You probably have an initializer with this line: Rails.backtrace_cleaner.remove_silencers!
...it with additional joins or conditions. We call this chaining scopes. In practice chaining becomes problematic when scope chains grow more complex. In particular having JOINs in your scope will...
...year is the week with January 4th in it. All days in this week belong to the year. This means that January 1st, 2nd and 3rd may or may not...
...the year. I am not sure which year December days in the same week belong to, I believe the week actually gets split into two calendar weeks in two different...
Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.
...use Spreewald's "... in the HTML" meta step, or add this proxy step for better semantics: Then /^I should( not)? see "(.+?)" in the page source$/ do |negate, text|
...to intercept those RSS links, and Capybara internally remains on the previous page. This behavior can be circumvented with the following simple step: # Firefox seems to intercept RSS links. Use...
The step we used in the past (Then "foo" should not be visibile) doesn't reliably work in Selenium features...
tl;dr In Chrome DevTools in the Sources tab you can activate Event Listener Breakpoints for debugging events. Example
...invalid calc value is ignored, so you might end up with missing or "random" behavior, depending on where you do this. The above example is valid once you use zero...
If you want to make your Rails application be capable of sending SMTP emails, check out the action mailer configuration...
Converting string characters to or from their integer value (7-bit ASCII value or UTF-8 codepoint) can be done...
Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...
The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...
...Short explanation: asset_host is used for links to stylesheets and javascripts asset_host belongs to ActionController::Base -- changes are persistent and will not be reset after a request
Around will not happen until after a feature's Background has been processed. Use Before and After to avoid that...
We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...
You are not using javascript tests The file is served from a public folder (not via controller) Problem description...
Today in computer: In Coffeescript, on and yes are aliases for true. off and no are aliases for false.
I needed to make sure that an element is visible and not overshadowed by an element that has a higher...
...be quite useful to quickly find the JavaScript that is responsible for some (unexpected) behavior. You can use DOM Breakpoints for debugging subtree modifications, attribute modifications or node removal.
Suppose you want to implement a publish/subscribe pattern in your Frontend application to react to data changes and events. First...