PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02-16'::date, '2001-12-21'::date) OVERLAPS...

...date, '2002-10-30'::date); overlaps -------- false Also compare our card Test if two date ranges overlap in Ruby or Rails...

makandra dev
rawgit.com

...want to use it in production, but it may serve you well for some testing/prototyping/etc...

require 'spreadsheet' Spreadsheet.client_encoding = 'UTF-8' book = Spreadsheet::Workbook.new sheet1 = book.create_worksheet :name => 'test' money_format = Spreadsheet::Format.new :number_format => "#,##0.00 [$€-407]" date_format = Spreadsheet::Format.new :number_format => 'DD.MM.YYYY...

...sheet1.column(2).default_format = date_format sheet1.row(0).push "just text", 5.98, DateTime.now book.write 'test.xls' That's how to insert Links into a excel cell book = Spreadsheet::Workbook.new sheet1 = book.create...

Shared example groups are a useful RSpec feature. Unfortunately the default directory structure generated by rspec-rails has no obvious...

...SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=unknown state SSL Server Test This SSL Server Test can help finding out which SSL/TLS versions the server can handle...

...rails generate cucumber:install --capybara to integrate cucumber/capybara into your rails project. Run your tests and fix error messages by reintegrating parts from your backed up files...

github.com

Then the "sorted" select should be sorted But the "unsorted" select should not be sorted

37signals.com

How to call routes, make requests and try out helpers from the Rails console.

You can chain multiple Capybara matchers on the page or any element: expect(page) .to have_content('Example Course')

VCR.use_cassette(' ', match_requests_on: %i[method oauth_uri]) do # Your test here

...is not used before removing it. If you remove the --dry-run flag, all tests will actually run and you can skip adding the require_relative line. It will take...

...Upgrade spreewald: bundle update spreewald Upgrade cucumber_factory: bundle update cucumber_factory Upgrade parallel_tests: bundle update parallel_tests Even on the latest version, parallel_tests will print some deprecation...

github.com

...page will show up in your browser. Note that if you run your Cucumber tests using the cuc script from our geordi gem, it will automatically detect cucumber_spinner and...

makandra dev
mixedcontentexamples.com

The pages […] allow you to see different types of mixed content and test how they behave in your browser. The "Secure" pages are referencing assets with HTTPS, the "Non-Secure...

...same behavior with both Secure pages and the Secure HTTP page for a given test; the behavior will change on the Non-Secure HTTPS page. Also see Testing HTTPS with...

...and change the stored environment: RAILS_ENV=development rails db:environment:set For parallel tests: rake parallel:rake[db:environment:set] Then re-run your command. Or, if you are...

...linking from HTTPS to HTTPS. Fixes Tunnel links through a non-HTTPS page (but test the effect because HTTP referers survive a 301 redirect) There's a new tag you...

makandra dev
developers.google.com

Chrome has a built-in utility to check performance and accessibility (and more) of your web app: Lighthouse.

makandra dev
api.rubyonrails.org

Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...

before(:all) runs the block once before all of the examples. before(:each) runs the block once before each...

When testing Ollama vision requests with VCR, the recorded cassettes will contain the full base64-encoded image payloads. A single image can easily be hundreds of kilobytes; a handful of...

github.com

...page is a collection of common markdown XSS payloads which is handy for writing tests. Producing arbitrary links: [Basic](javascript:alert('Basic')) [Local Storage](javascript:alert(JSON.stringify(localStorage))) [CaseInsensitive](JaVaScRiPt...

...What Consul does internally is fetch all the IDs of the power.posts scope and test if the given record's ID is among them. This list of IDs is cached...

Here is a short summary of Cucumber hooks in Ruby taken from https://github.com/cucumber/cucumber-ruby. Note that the BeforeStep is...

...in your mailer: # production.rb: Rails.application.configure do config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = smtp_settings end # test_mailer.rb def test_mail mail(to: 'mail@example.com', subject: 'Subject').delivery_method.settings.merge!(smtp_settings) end Configuring SMTP with...

...a Google account These is an example configuration you can use to test if mail delivery works in your application: smtp_settings { address: 'smtp.gmail.com', domain: 'smtp.gmail.com', port: 587,