...a button on a Selenium-controlled browser, the call will return control to your test before the next page is loaded. This can lead to concurrency issues when a Cucumber...

github.com

Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating system. Unfortunately, setting these virtual machines up without Microsoft's...

...How to make a terminal window title reflect the current path Too many parallel test processes may cause flaky tests Load rbenv on session create Load nvm on session create...

...on a Rails project a bundle install will get you back the gems. Run tests Now run your test suite to see if the migration was successful. Troubleshooting: Use an...

...server from time to time. Before doing a full deploy, you might want to test that server in an isolated deploy. There is a single way to do this: the...

...run for servers matching {:roles=> }, but no servers matched. Instead, specify the server-under-test like this: HOSTFILTER=separate-sidekiq.makandra.de cap production deploy Capistrano is aware of this env variable and...

...silence some specific warnings. Add this to your initializers, or require it in your tests: silenced = [ /Not considered a useful test/, /use: should(_not)? have_sent_email/, ] # list of warnings...

medium.com

Advantages over a classic Rails monolith By (automatically) only requiring expected/allowed dependencies in tests, components cannot accidentally use (i.e. depend on) code they're not allowed to

...of the clear separation and dependencies. No need to know the whole application. Faster test runs, because only dependent components need to run. A growing team can still keep up...

makandra dev

...if you make any error in programming. E.g. a simple typo would make the test above green. The block will catch the Spec:: exception and the test will be happy...

blog.hashrocket.com

Testing with real live production data does come with at least one catch. All those real live users in your production environment have real live email addresses that receive real...

makandra dev

...Find descendant(s) by CSS selector .find(selector) one: .querySelector(selector), many: .querySelectorAll(selector) Test an element (returns boolean) .is(selector) .matches(selector) Test for class presence (boolean) .hasClass(class...

rspec.info

You can define methods in any example group using Ruby's def keyword or define_method method: describe "example" do...

.replace(/^/, '#') Ruby My use case was comparing colors in an integration test, so I used JS to get the pseudo element's style via Selenium, and then processed it...

...Here is how to circumvent that. What's going on? You are making ActionController::TestRequests in your specs, and their #initialize method does this: self.session = TestSession.new This means that each...

...behavior by stubbing the controller's session and querying that stub: persisted_session = ActionController::TestSession.new controller.stub :session => persisted_session # do things persisted_session[:something].should ... Apply this workaround only when...

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

...not to include 3 Applications Tip This can be used to test for exclusion of multiple values all at once...

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

Custom matchers are a useful RSpec feature which you can use to DRY up repetitive expectations in your specs. Unfortunately...

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

...and check if your application responds and everything looks okay. Run your application's tests...

...files from the dist folder, which is most often <ES6 javascript. 9. Achieve green tests. 10. Check if postcss, uglifier, babel and other compilers work for production. This can be...

github.com

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