If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.
RSpec 1 (Rails 2) With the most recent spec_candy.rb helpers you can say: User.stub_any_instance(:foo => :bar) user = User.new...
To show the collation of your tables you have to login to the MySQL console and execute SHOW TABLE STATUS...
The solution in this card is based on a stack overflow post by Leventix. If you need to make request...
The Rails logger will store its content in a buffer and write it into the file system every 1000 lines...
When your Cucumber feature seems to forget cookies / sessions when you run it with Selenium check if the test travels...
RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...
Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...
Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...
You can use the step definition below to say this: Then the "Last name" field should have an error
When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...
We are consistently having trouble with selenium-webdriver > 2.5.0 where whenever we try to select an option from a Capybara...
Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...
Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that...
When you don't know which options are available, but need to have an option selected, use this step.
There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...
Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating...
These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:
Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...
Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...
Note that if you plan to downgrade Firefox because your Selenium tests broke after a Firefox upgrade, there is a...