makandra dev

...rails generators) with rails g -h. generator model migration controller entry in routes.rb views tests scaffold ✔ ✔ ✔ ✔ ✔ ✔ resource ✔ ✔ ✔ ✔ ✔ model ✔ ✔ ✔ controller ✔ ✔ ✔ migration ✔ Also see this blog post...

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

...you could open a new tab via window.open when using execute_script in Selenium tests. It no longer works in Chrome (will show a "popup blocked" notification). This is because...

So I checked the /var/lib/dpkg/info/varnish.postrm for exit 78 and found the following: [...] if test -e /var/lib/varnish; then rm -r /var/lib/varnish > /dev/null 2>&1 || exit 78 fi [...] This directory couldn...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can do this: # Find our target window handle = page.driver.find_window("My...

...is not used before removing it. If you remove the --dry-run flag, all tests will actually run and you can skip adding the require_relative line. It will take...

...above commands does, see explainshell. Note that we use geordi cucumber to run our tests. If you don't, xargs cucumber or similar might work for you. Part of Geordi...

makandra dev
github.com

...If you want to open XLSX spreadsheets (for example to confirm your output in tests), you can use roo. To easily dump Rails records to XLSX, there is also axlsx...

Note that if you plan to freeze your Firefox versions because your Selenium tests break whenever Firefox updates, there is a better way that lets you keep an up-to...

If you get an error like this for a puppet mount: $ > puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for example.makandra.de Info: Applying...

...should way of writing specs for expecting things to happen. However, if you have tests you cannot change (e.g. because they are inside a gem, spanning multiple versions of Rails...

...rails generate cucumber:install --capybara to integrate cucumber/capybara into your rails project. Run your tests and fix error messages by reintegrating parts from your backed up files...

...Solution: Add gem 'minitest' to your Gemfile, before any rspec gem. Another MiniTest::Unit::TestCase is now Minitest::Test. From /Users/makandra/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/test/unit/testcase.rb:8:in ` ' In order to remove this message, you...

Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump would be to big. mysqldump -u deploy_user -p application...

...in features/support/paths.rb. Capybara The step definition is part of Spreewald. The step has been tested with multiple versions of Capybara, Rack::Test and Selenium. Webrat (legacy) This is a simpler...

askubuntu.com

...I had to choose "proceed without pairing" and enter the PIN "0000" Select & test the headphones in System Settings > Sound. Choose High Fidelity Playback (A2DP Sink).

If you are using VNC to run Selenium tests, it may be hard to see what's going on since by default there is no list of open windows and...

rubydoc.info

Preface: Normally, you would not need this in integrations tests (probably that's why it is so hard to achieve), because it is no actual "integration testing". If you use...

github.com

...I have not used Colcade yet, but it looks very promising. It has no tests, though. I'd also love to see a migration guide for users coming from Masonry...

...the usual notification rules, i.e. you won't get anything in the development or test environments. Obiously, this only works with tasks that actually depend on :environment...

...visit url_for(request.params) end For a step that distinguishes between drivers (Selenium, Rack::Test, Culerity), check n4k3d.com...

github.com

...Opera 11.00, and possibly other browsers.) Caches the results of its two feature tests in jQuery.fn.placeholder.input and jQuery.fn.placeholder.textarea. For example, if @placeholder is natively supported for input elements, jQuery.fn.placeholder.input will...

makandra dev

...to record communication with remote APIs is a great way to stub requests in tests. However, you may still want to look at the request data like the payload your...

...have_requested(:post, 'http://example.com').with(body: 'yolo') Easy peasy. Related cards Faking and testing the network with WebMock

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