...mit LUKS. Kopiere eine Datei darauf. Gib das Gerät einem Kollegen der es zum testen entschlüsseln soll Beschäftige dich damit, wie die Full System encryption mit LUKS funktioniert. Installiere eine...

When tests might not run with skipping RSpec in the RSpec.describe failing with the error undefined method 'describe' for main:Object this card will help you out!

...from that file, if there are any. That should only happen in development, since tests or production environments will fail when trying to compile their assets up front. class ApplicationController...

Consider this class: class Foo private def test puts "Hello" end end While you can say create a block to call that method (using ampersand and colon) on Ruby...

...Foo.new.tap(&:test) Hello => # ... you cannot do that on Ruby 1.9 or 2.0: 1.9.3 > Foo.new.tap(&:test) NoMethodError: private method `test' called for # ^ 2.0.0 > Foo.new.tap(&:test) NoMethodError: private method `test' called for...

In CI test runs I noticed that string sorting order changed after switching from a debian-based PostgreSQL docker image to one that is based on Alpine Linux.

...the locale-provider icu which can also handle UTF-8 locales. I have not tested this approch. So either try this or switch back to a debian-based image (e.g...

...behavior, not give you a safe string in the end (see below). Example def test(input) input.gsub /(f)/ do puts $1 'b' end end >> test('foo') f => "boo"

...54a28b1 o │ Support dalli 3.2.1 <=== we need this commit bd5188b o │ Fix flakey Memcache tests ... 923d91e M─│─┐ Merge branch '6-1-sec' into 6-1-stable 10a2c77 │ o─┘ Preparing for...

yarn add coffeescript coffee-loader Define a CoffeeScript loader (e.g. in config/webpack/loaders/coffee.js) module.exports = { test: /\.coffee$/, use: [{ loader: 'coffee-loader' }] } Add the loader to the Webpacker environment (e.g. in config/webpack/environment.js...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you a new Cucumber tag @no_parallel which ensures that the...

...scenarios not tagged will @no_parallel can still run in parallel with the tagged test. Please read the previous sentence again. This can help when multiple test processes that access...

...Angular app employs uiRouter, although it is not used nor actually required for this test. Working test setup # Capitalized expressions are intended to be replaced with YOUR values describe 'SERVICE...

...httpBackend.verifyNoOutstandingExpectation() @$httpBackend.verifyNoOutstandingRequest() describe 'FUNCTION()', -> it 'does something', -> # Maybe some code here # Call function under test (triggers API request, which will be intercepted) @SERVICE.FUNCTION()

...do something before request is answered

...matcher, the attached matcher will also work on associations, which makes it ideal for testing assignable_values. Usage example describe Unit do describe '#building' do it 'should only allow buildings...

...association_values(unauthorized_building, nil).for(:building) end end end end Alternatively you could test explicitly for the method that assignable_values generates: ... Power.with_power(power) do expect(power).to...

github.com

You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work. Here is a solution for request specs, adapted from the Devise...

...wiki. We will simply use Warden's test helpers -- you probably already load them for your Cucumber tests. First, we define sign_in and sign_out methods. These will behave...

.../var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log { daily rotate 7 missingok create 640 mysql adm compress sharedscripts postrotate test -x /usr/bin/mysqladmin || exit 0 # check if server is running if mysqladmin ping > /dev/null...

makandra dev
github.com

...to make it accessible from other machines in the local network, e.g. with a test iPad Improve geordi tests: If rake runs tests, skip other test runs (cucumber, rspec), as...

...rake usually runs all employed tests Rename geordi devserver to geordi server (the former is still supported) Improved command descriptions and README Fix geordi firefox --setup: Fail on missing version...

...inserted data in a migration or when you had to kill -9 a frozen test process. Old Capybara versions already have the Database Cleaner gem as dependency. Otherwise add database...

...Rake task by copying the attachment into lib/tasks/clean_database.rake. Now you can e.g. clean the test database by saying on the shell: rake db:clean RAILS_ENV=test

...Selenium note, I found yet another solution for the problem to hide your selenium tests away. This has the advantages ^ not to require a gem (so you do not force...

...at the running webdriver if necessary Simply make a script that runs your cucumber tests and runs this before: vncserver :6 -localhost -nolisten tcp -SecurityTypes None &>/dev/null DISPLAY=":6"

When you want to test how an web-application reacts in a specific resolution, you can set up a specific Selenium driver for some tests: Before('@chrome320x480') do Capybara.current_driver...

...your path. You can also set a special binary you only use for theese tests. You set up the driver in a file like this # features/support/chrome.rb Capybara.register_driver :chrome320x480 do...

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

jasmine.github.io

...expect(timerCallback).not.toHaveBeenCalled(); jasmine.clock().tick(101); expect(timerCallback).toHaveBeenCalled(); }); If you actually want the test to wait out the timer, your example function needs to accept a done argument, which...

...you then call when the test is expected to finish: it("causes a timeout to be called", function(done) { setTimeout(function() { timerCallback(); }, 100); setTimeout(function() { expect(timerCallback).toHaveBeenCalled();

...comes from try to run the tests with a step output. bundle exec parallel_cucumber --test-options "--format=pretty" feature The deprecation message looks like following: Locator Integer:2 for...

...that running the Ruby garbage collector only every X seconds can speed up your tests. I found that deferring garbage collection would speed up my RSpec examples by about...

...but it probably depends on the nature of your tests. I also tried applying it to Cucumber features, but found no performance improvements. Since Joe is using Test::Unit in...

...same regardless of the driver Capybara is using (drivers are e.g. the headless Rack::Test or Selenium). It is a stupid idea to call #node on such a Capybara node...

...used by the driver, e.g. instances Nokogiri::XML::Element if you are using Rack::Test, or of Selenium::WebDriver::Element if you are using Selenium. Because the API of these...

...your stubs, so it is always http://example.com/?foo[]=1&foo[]=2&foo[]=3. This might lead to green tests, but in fact crashes in real world. Rack::Utils.build_nested_query might help to build...

...Specs with --backtrace option Run Cucumber features (with Geordi's --debug option) When all tests are green, look through your Gemfile and remove as many version constraints as possible.

Update rspec to '< 2' Lock haml to '= 3.1.7' Unlock andand Unlock rake Lock test-unit to '= 1.2.3' Lock database_cleaner to '< 1.3' Lock cucumber to '< 2'