Because your examples should not change global state, you should not need to care about the order in which RSpec...

I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the...

geordi, our collection of awesome shell scripts, has been extended by three scripts to help you call RSpec or Cucumber...

When using the resource_controller gem you often hook onto events like this: update.before do do_something end

When your cucumber features grow massively over time, the test execution can take a lot of time.

Run rspec-and-cucumber from any project directory to run both RSpec and Cucumber. If available, rspec_spinner or cucumber...

The Basic Authentication header encodes username and password. Effectively, it's just Base64 plus a "Basic" prefix.

benmabey.com

Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...

When you write a custom RSpec matcher a good place to store them is to create one file per matcher...

To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne'))

jeffkreeftmeijer.com

Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...

Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if...

If in your application your users pass along params that result in filenames, like invoices/generated?number=123. This could be...

The attached RSpec matcher exist_in_database checks if a given record still exists in the database and has not...

We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...

track down warnings and to see failing specs immediately or to get an overview of the core...

So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...

makandra dev
innig.net

If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...

To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...

Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...

justinfrench.com

If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...

In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...

You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)

RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...