...can use this command: :%s/{{\([^\}]*\)}}/%{\1}/cg Fix deprecation warnings with :overwrite_params Run tests Deploy See the commit log for a detailed list of changes. 2.3.9 to 2.3.10

...Upgrade rails gem Change your environment.rb so it says RAILS_GEM_VERSION = '2.3.10' Run tests Deploy Also see commit log. From 2.3.10 to 2.3.11 Fixes multiple security issues.

Tooltips that are delivered through HTML attributes are encoded. Decode entities before checking for their presence. Capybara: Then /^there should...

...ihm über die Dinge, die du im Netzwerktab herausfinden kannst. Starte dir einen LXD Testcontainer mit Ubuntu. Installiere Nginx und erstelle eine Konfiguration die folgende Eigenschaften erfüllt:

...sie dir in die /etc/hosts mit der entsprechenden IP einträgst. Installiere Docker auf deinem Testcontainer und starte httpbin auf Port 8080. Du kannst dafür folgendes Kommando verwenden:

To delay your entire Jasmine test suite until the DOM is ready, add the following: beforeAll(function(done) {

When you don't know which options are available, but need to have an option selected, use this step.

...own fill_in so don't use it unless you are having problems with test suites that are unusable because of this problem. To use the patch in Cucumber, copy...

...has the line gem 'rails', '~>5.2'). I also experienced that doing upgrades per group (test, development) are easier to do. Thus --groups might also be helpful. $ bundle outdated --strict --groups...

...newest 5.2.6, installed 5.2.4.6) ... ===== Group "development" ===== * binding_of_caller (newest 1.0.0, installed 0.8.0) * parallel_tests (newest 3.7.3, installed 2.32.0) * query_diet (newest 0.7.0, installed 0.6.2) * spring (newest 2.1.1, installed...

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

...your config/database.yml: default: &default adapter: postgresql # ... variables: statement_timeout: 10s # or ms, min, etc Test that it works: ActiveRecord::Base.connection.execute("show statement_timeout;").map { |row| row } => [{"statement_timeout"=>"10s"}]

...by adjusting your config/database.yml: default: &default adapter: mysql2 # ... variables: max_execution_time: 10000 # ms Test that it works: begin ActiveRecord::Base.connection.execute("SELECT 1 WHERE sleep(15)") rescue ActiveRecord::StatementTimeout => e...

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

...No power to ['creatable_cards'] The reason for this behavior is that the Capybara test server is running in another thread, and the RSpec thread can't "see" the exception...

...not write such assertions in feature specs anyway. Instead, you could: write the same test as a request spec expect what the user sees in this situation, e.g. an error...

...KB or Zousan. You can even polyfill Promise with jQuery itself using 339 bytes. Testing async code We want to test this code: whenLoaded = new Promise(function(resolve, reject) { $(resolve...

...function foo() { } function callFooWhenLoaded() { whenLoaded.then(foo) } This test fails: describe('callFooWhenLoaded()', function() { it('calls foo()', function() { spyOn(window, 'foo') callFooWhenLoaded() expect(foo).toHaveBeenCalled() }) }) The test fails since we're expecting...

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

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

makandra Operations

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

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

...with its showtimes. This lesson covers Rails' nested attributes and how to build and test such forms. Important Work on this lesson in advisor mode. Learning goals You can explain...

...JavaScript as a reusable component that knows nothing about a particular model. You can test a nested form, including how to address repeated fields. You can lay out a nested...

...This lesson covers storing uploads as model attributes with CarrierWave, generating image versions, and testing uploads. Important Work on this lesson in advisor mode. Learning goals You can explain how...

...can keep an upload across a form redisplay after a validation error. You can test uploads: an end-to-end test for the happy path, unit tests for versions and...

relishapp.com

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

makandra dev

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

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

...happen to load into the same process. On a sharded CI you get a test that fails on some runs and not others. How affected tests look like

end it 'resolves the association' do self.class::Thing.new.project end end Running this test will raise an error: ArgumentError: The Project model class for the RSpec::ExampleGroups::SomeUnrelatedGroup::Thing...

badssl.com

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