I recently encountered the error above when I was running selenium tests. Thanks to a post on stackoverflow I found out that clearing all files in tmp/cache in my project...
You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you move on with this note. Say this is your Spaceship...
...docked => :en_route end before_transition :on => :launch, :do => :release_docking_clamps end end Testing that a state_machine callback is called at the correct point in a record's...
Since we're using RSpec on most projects, I've transformed the test for it to a spec. See the attached link...
If you need to test some HTML, e.g. an embed code, you can use RubyMine's "scratch files": File > New Scratch File (or Ctrl + Shift + Alt + Ins) Select "HTML" as...
While you can set your own font in your terminal or other tools, it will not change the default "Monospace...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true: - if user.photo.present? # always true
...developed as a C extension, so it's fast. And it has a full test suite so it's reliable. Note that byebug works only for ruby 2.0.0 or newer...
When running tests via parallel_tests, you may encounter an error: cannot load such file -- parallel_tests/gherkin/runtime_logger Error creating formatter: ParallelTests::Gherkin::RuntimeLogger (LoadError) This will happen when you upgrade...
Code coverage is the ratio of code lines kissed by a test vs. the total number of lines in your source files. This sounds meaningful, but isn't. Total coverage...
...For Spreewald >= 1.9.0 it is as described in Solution 1. When doing integration testing with cucumber and selenium you will often encounter problems with timing - For example if your test...
...runs faster than your application, html elements may not yet be visible when the test looks for them. That's why Spreewald (a collection of cucumber steps) has a concept...
...the visibility: hidden rule is not checked at all. Selenium Selenium is an integration test framework that consists of different tools to test websites and web-applications with real browsers...
...method? Due to the fact that a real browser is used for your website tests, the browser itself is aware of all visible and hidden elements since it parses CSS...
Just install the texlive-xetex package: sudo apt-get install texlive-xetex Running integration tests without texlive-xetex will produce an error during xelatex execution: RTeX::Document::ExecutableNotFoundError
...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...
...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...
...Cucumber the way you want it: Prints some line feeds to easily find your test results when you come back to the console later Configures Cucumber to use cucumber_spinner...
...features if you setup your system that way Runs features in parallel if parallel_tests gem was found in you Gemfile and no rerun.txt with content exists [UPDATE] You can...
If you get the above error when running tests in bulk (but not individually), it's actually the fault of Webmock. Updating Webmock to version 1.7+ fixes this...
...only runs when it is called directly, but not as part of the whole test suite, make sure the filename is foo_spec.rb instead of just foo.rb...
...Behind the link, you'll find a simple HTML page that offers some cookie tests (how large, how many etc) and an overview of this data for various browsers.
...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...
...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...
...message may occur when rspec gets loaded by rake, e.g. when you migrate the test database. NoMethodError: undefined method 'last_comment' for # Rake 11 removes a method that rspec-core...
...build great web applications. In a pretty traditional world you write code, you write tests for it, you deploy, and you go home. Until now...
...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...
...below by copying it somewhere to your .bashrc. # Usage: ptcommits 123456 function ptcommits { if test "$1" then local PTID=$(echo "$1" | grep "[0-9]*" -o) # Allow URLs git log --oneline...