A fake filesystem. Use it in your tests...
...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...
...while you code. As soon as you push your commits, it builds, runs your tests, and makes sure everything works fine...
Or, you can test your Rack application (or Sinatra, or Rails, or Merb) using arbitrary HTTP client libraries, to check interoperability...
Write declarative tests using nested contexts without performance penalties. Contest is less than 100 lines of code and gets the job done...
Riot differs primarily in that it does not rerun setup for each test in a context...
Unlock achievements for running your test suite...
ShamRack mounts a Rack app locally, just for your tests. It goes one further: it “mounts” it using Net::HTTP such that requests to the Rack app never hit any...
The Holy Grail of testing for front-end development; execute browser-less, console-based, javascript + DOM code right from within your Rails test suite...
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...
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...
Don't insert table rows in a Rails database migration. This will break tests that expect that database to be empty and cause you all sorts of pain.
...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...
...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...
...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...
...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...
...to a given address. This is useful for staging environments where you want to test production-like mail delivery without sending e-mails to real users...
...to :log or :raise to enable. The default value is :log in development and test environments, and false in all other environments. Rails 3: If you include the strong_params...