...will not recompile. The digest of the last compilation is cached in tmp/cache/webpacker/last-compilation-digest-test (replace -test with your environment). You can remove that file to force a re-compile...
...SOAP API, you may want to use Savon::SpecHelper to mock requests in your tests as described in their documentation. When sending a message body, the savon mock object requires...
...note: You could use VCR to record your SOAP talk. In my case my tests had to talk to the same service the staging servers talk to, so any recorded...
...callbacks for a particular form screen, but then the model becomes a pain in tests, where all those callbacks just get in the way. Or we have different forms for...
...the model itself stays slim and validations don't get in the way of tests, validations don't get in the way of tests meaning that developers need to be...
...the actual expression is always converted to a regular expression. # For expected === actual foo('Test(s)', 'Test(s)') #=> true # For expected.match?(actual) foo('Test(s)', 'Test(s)') #=> false
...a nice way of processing parameter options, some utility classes and Cucumber steps for testing your CLI app...
# visit page.driver.last_request.env['HTTP_REFERER'] # old visit page.driver.request.env['HTTP_REFERER'] # new # or for javascript tests: page.execute_script('window.history.back()') end undefined method locate for #Capybara::Session (NoMethodError) Use page.find instead of...
...now wrapped by a html document skeleton. Use page.text instead. (e.g. when you are testing correct JSON which is in fact not wrapped by a html sceleton) An element can...
...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...
Working with a self-signed certificate is much easier, when the browser accepts it. Google Chrome Warnings from chrome might...
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...
...user hovers over the button, or when the article is scrolled into view). 6. Test it! There is so much that can go wrong with the buttons or how the...
...share dialog popups interact with your layout. Always test with each social network. Consider using a fake profile for this so you don't annoy your real life friends...
...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...
In order to chain greps on log files that are opened via tail -f test.log you have to use the --line-buffered command line option for grep. Imagine you have...
...the following content in your log file. # content for log/test.log test foo bar test foo bar baz bla Now if you would like to grep for lines that contain foo...
...consolidated commit. Having as little commits as possible to restore later is key. Run tests and fix them, if necessary. Maybe tests were added that expect the removed functionality as...
...nick-invision/retry to re-try a failing command, optionally with a timeout: --- ... jobs: test: ... steps: - name: Run tests uses: nick-invision/retry@v2 with: timeout_seconds: 30 max_attempts...
Sometimes you need a file of some size (possibly for testing purposes). On Linux, you can use dd to create one. Let's say you want a 23 MB file...
...called test.file. You would then run this: dd if=/dev/zero of=test.file bs=1048576 count=23 The block size (bs) is set to 1 MB (1024^2 bytes) here, writing...
...and has very nice defaults and coloured output which makes it good for local testing. Usage examples with curl equivalent: # curl post curl --data "foo=23&bar=42" https://example.org...
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...
...through of unknown options to Cucumber Add --rerun=N option to rerun failed Cucumber tests up to N times. Reboots the test environment between runs, thus will pick up fixes...
...as an npm package. // vendor/asset-libs/bought-font/package.json { "name": "bought-font", "version": "1.0.0", "description": "", "main": "index.scss", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Salesman of trust", "license": "LICENSE", "private": true...
...official" rails2 branch [2] which contains commits that were added after 0.8.6 was released. Tests are fully passing on our fork for Ruby 1.8.7, REE, and Ruby 1.9.3.
...of Module.const_defined? was missing. [2] Changes for replica sets were reverted (since their tests were not passing) and some tests were fixed...
...that has two disadvantages: You're doing something that never happens in reality. Your tests shouldn't do things your code never does. You're fiddling with internal state. When...
...writing tests, stay on your chosen abstraction level. Solution 1 record.unmemoize_all Solution 2 Perform a full reload by re-finding your record: it 'updates on changes' do subject.seat_counts...
...provides a script to migrate your Ruby project automatically. Make sure your project has tests and you have a backup of your files (or pushed your commits to Git)
...is not perfect). Check the diff to see what the script has done. Run tests to see if everything still works...
Our rspec_candy gem now gives you three matchers: be_same_number_as Tests if the given number is the "same" as the receiving number, regardless of whether you're...
...purposes". Internally the matcher compares normalized results of #to_s. be_same_second_as Tests if the given Time or DateTime is the same as the receiving Time or DateTime...
When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is a very convenient way to do that. Anything that writes...
...print) can be captured like this: expect { something }.to output("hello\n").to_stdout Testing stderr works in a similar fashion: expect { something }.to output("something went wrogn\n").to...