Better output for Cucumber
...page will show up in your browser. Note that if you run your Cucumber tests using the cuc script from our geordi gem, it will automatically detect cucumber_spinner and...
Freeze (vendor, unpack) a single Ruby gem with and without Bundler
...will be missing. Use this instead: rake gems:unpack GEM=cucumber_factory RAILS_ENV=test
Railscheck project home page
...a shell command task "railscheck" that you can run against your Rails projects to test for a number of typical bugs, potential problems and inconsistencies...
The Exciter - Why You Should Deploy Your Next Application on Ruby 1.9 and a Rant in General
...people, when there’s a gem update I know that it has actually been tested somewhat and it’s not just whatever random point HEAD happens to be at, at...
Integrity | The easy and fun automated continuous integration server
...while you code. As soon as you push your commits, it builds, runs your tests, and makes sure everything works fine...
edgecase's ruby_koans at master - GitHub
...language, syntax, structure, and some common functions and libraries. We also teach you culture. Testing is not just something we pay lip service to, but something we live. It is...
CoffeeScript
...JavaScript libraries (jQuery, PrototypeJS), debugging support (it becomes pure, readable JavaScript), existing support from test suites (it’s normal JavaScript) and growing support from various text editors (TextMate, Vim, Emacs...
Structuring Rails applications: the Modular Monorepo Monolith
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...
Geordi hints
...this to run a full setup. After basic setup (see geordi help setup), runs tests and loads a staging dump into the database. geordi security-update Guides through our security...
Debugging cucumber feature with javascript + firefox vnc
TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop at the problematic point (with Then pause from Spreewald...
The Easiest Way to Parse URLs with JavaScript
...Unpoly you may also use up.util.parseUrl(), which implements the technique in this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from...
RSpec < 2.11: ActiveRecord scopes must be loaded before using the "=~" matcher
To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11: actual_array.should =~ expected_array If either side is an ActiveRecord scope...
Waiting for page loads and AJAX requests to finish with Capybara
Then ... Workarounds like this do not work reliably, will result in flickering tests and should be avoided. There is no known reliable way to detect if the browser...
RSpec: Expect one of multiple matchers to match
Real-world example A real-world use case would be to test if the current page has a button with the label "Foo". There are many ways...
Good real world example for form models / presenters in Rails
...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...
Let the browser choose the protocol
...display the video. When you deliver your youtube video via https://youtu.be/jyElDp98HdI your test which checks that the embeded video is rendered in the view will fail because your...
...test server doesn't use https Solution Let your links look like //youtu.be/jyElDp98HdI and you will be fine, server side and test side...
How to hide your selenium browser window with "headless"
...provides some instructions how you can get it to work with your cucumber acceptance tests using selenium webdriver as a capybara driver. Install xvfb if it is not installed yet...
...window, you can tag it with @no-headless. Note: If you are using paralell_tests to run your tests in parallel you have to take care of several things to...
Installing Ruby 2.3 or below on Ubuntu 17 and above
...with libssl-dev. From the linked StackOverflow comment: As far as I know (and tested), Ruby versions < 2.4 requires libssl1.0, while >2.4 libssl1.1+. The two libssl packages conflict with each...
Selenium may break with ChromeDriver 75+
...your ChromeDriver to version 75 or beyond, you might get w3c errors in your tests. For example, reading the browser console for errors no longer works, and page.driver.browser.manage.logs.get(:browser) will...
Minimal JavaScript function to detect version of Internet Explorer or Edge
...rv:|Edge\/)(\d+)/.exec(uaString); if (match) return parseInt(match[2]) } Here are the tests: describe('ieVersion()', () => { it('returns 10 for Internet Explorer 10', () => { version = up.browser.ieVersion('Mozilla/5.0 (compatible; MSIE...
Make nokogiri >=1.6.0 use system libxml2
...it with gem uninstall nokogiri. If you deploy with capistrano, bundler ignores development and test group, which means nokogiri is not loaded. Step 4 will not work in this case...
whenever: Make runner commands use bundle exec
...the best practice to hide background tasks behind a single static methods you can test, this is probably preferable to defining additional Rake tasks. Unfortunately when whenever register a runner...
Fix: Capybara is very slow when filling out fields in large forms
...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...
Sync confidential files between unixes using cloud storage and encfs
...one-sync once. It should ask you for some encfs settings; just press ENTER. Test it by putting some file into ~/sync. An encrypted version of your file should show...