web.archive.org

This step tests whether a given select option comes preselected in the HTML. There is another step to test that...

This note describes a Cucumber step definition that lets you test whether or not a CSS selector is present on...

blog.jcoglan.com

Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you...

github.com

Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I...

You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...

Sometimes the order in which strings appear on a page matters to you. Spreewald gives you steps like these:

Capybara's has_css? matcher has a couple of options you might find useful. Check that a selector appears a...

Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...

These steps are now part of Spreewald. This note describes a Cucumber step that lets you write this:

Both these approaches will keep your GET parameters -- and will only work for GET requests. Capybara: When /^I reload the...

Cucumber step argument transforms can be a powerful way to make your steps more flexible. Note however that if your...

testobsessed.com

So this is the simulation that I use in my Agile Testing class, as well as in other contexts where...

RSpec's context (which is basically an alias for describe) takes over your whole application. No object may have its...

web.archive.org

With its you can switch the subject of an example to a method value of the current subject: describe Array...

This will not work (it always passes): Then the "Title" field should contain "" The value is turned into a regular...

youtube.com

power-rake db:migrate VERSION=20100913132321 By default the environments development, test, cucumber and performance are considered...

To only run a single describe/context block in a long spec, you can say spec spec/models/note_spec.rb:545 ... where the describe...

You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...

When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each...

When a spec only runs when it is called directly, but not as part of the whole test suite, make...

github.com

By default, Cucumber uses mocha. This note shows to use RSpec stubs and mocks instead. Rspec 1 / Rails 2

makandra dev

This is an awesome gadget in your toolbox, even if your test coverage is great. gem install ruby-debug (Ruby...

Our gem Mail Magnet allows you to override e-mail recipients in ActionMailer so all mails go to a given...

This raises "Could not find first Keyword": describe Keyword do it { should validate_uniqueness_of(:text) } end Do this instead...