Connect to your IMAP server. If you have SSL enabled: openssl s_client -connect your-server:993 if your server...
To check if a method has been called in Jasmine, you first need to spy on it: let spy = spyOn...
When running Selenium features with parallel_tests, some browser-server interaction might take longer than usual and the impatient Capybara will not wait enough to see results. Put the attached...
With its you can switch the subject of an example to a method value of the current subject: describe Array...
In some older Capybara versions (e.g. 0.3.9), we're getting lots of deprecations warnings: Selenium::WebDriver::Element#select is deprecated...
Spreewald 1.3.0 comes with these steps: Then I should see an element ".panel" Then I should not see an element...
The solution in this card is based on a stack overflow post by Leventix. If you need to make request...
...a support module from rspec-rails: FactoryBot::SyntaxRunner.include(RSpec::Rails::FileFixtureSupport) That includes ActiveSupport::Testing::FileFixtures, where file_fixture is defined, but also configures the file_fixture_path so that...
This error occurs when passing an object instead of a string to Jasmine's describe(): # Bad describe(HoverClass, function() {...
Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc
The attached patch lets you find a record by a string or number in any column: User.find_by_anything('carla...
Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...
In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...
Capybara's has_css? matcher has a couple of options you might find useful. Check that a selector appears a...
JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:
So you're getting an error message like the following, although your Gemfile lists shoulda-matchers and it has always...
I recently enjoyed debugging a Cucumber step that tried to be retryable using a patiently block: Then /^"([^"]*)" should( not)? be...
Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...
...but not your rerun.txt.\ This sometimes happens when running multiple Cucumber workers with parallel_tests that write into rerun.txt simultaneously -- ending up with a messy, invalid file. Just remove it...
I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the...
script/cucumber features/feature_name.feature Or, if you don't care about speed, you can use rake: rake features FEATURE=features/feature_name.feature
If you are trying to integrate VCR and Cucumber 4 and you're using the use_scenario_name: true option...
To improve your chances to get proper error messages, you can try ^ to start cucumber with the -b option, so...
MAIL_RECIPIENT=you@example.com # eMail address where to send failures to. NUMBER_OF_TEST_PACKETS=5 # Number of ICMP packets to be sent to the target. If any fails...
...you'll get notified. function do_monitoring { ping -q -c $NUMBER_OF_TEST_PACKETS $TARGET status=$? if [ $status -ne 0 ]; then mail_traceroute $TARGET fi return $status } function mail_traceroute...