Tags

9 videos are tagged with rspec

Vlcsnap 2014 12 22 13h42m56s51 thumb
Rating: Everyone
Viewed 1,115 times
Recorded at: November 17, 2014
Date Posted: December 22, 2014

Spies are a relatively new feature in RSpec. In this tutorial-style talk: we'll look at what spies are, how spies work in RSpec and how one can write better tests with spies. We'll work through some of examples of writing new tests with spies, improving old tests with spies and the reasons why spying is a useful tool for your testing practice.

If you're new to RSpec and looking for ways to improve your testing practice, understand the library better or just ask some questions, this session will be great for you.

1189 rubyconf2008 rspec and cucumber thumb 0001 thumb
Rating: Everyone
Viewed 1,025 times
Recorded at: November 9, 2008
Date Posted: September 22, 2012

Vlcsnap 2010 10 05 15h04m07s132 thumb
Rating: Everyone
Viewed 1,747 times
Recorded at: November 4, 2007
Date Posted: October 5, 2010

Youtube thumb
Rating: Everyone
Viewed 727 times
Recorded at: September 26, 2013
Date Posted: October 30, 2013

918 railsconf2012 introduction to rspec thumb 0003 thumb
Rating: Everyone
Viewed 1,371 times
Recorded at: April 25, 2012
Date Posted: August 14, 2012

“A testing tool by any other other name would assert as truthy.” – some guy. You’ve seen Rails’ built-in Test::Unit in the morning session. This afternoon, we’ll introduce RSpec, another popular testing tool. We’ll overview basic structure, contexts, “should” expectations, mocking and stubbing. We’ll also cover Rails model, view, controller, routing, helper, and request specs.

755 rubymidwest2011 test your legacy rails code thumb 0003 thumb
Rating: Everyone
Viewed 2,515 times
Recorded at: November 4, 2011
Date Posted: January 4, 2012

Everybody wants to do test-driven development, but switching to TDD or BDD on an existing project that doesn't have tests presents special challenges. Often, the current code is a tangled mess of dependencies that defeats the very concept of unit testing. Worse, if somebody has attempted TDD in the past, you might have a test suite that needs to be fixed before any new tests can be written.

Don't give up. Adding test-coverage and TDD to your application will make it easier.

This session will describe techniques that you can use to bootstrap a test-driven process into your project. You'll see how to use "black-box" techniques that don't depend on the structure of the code and "white-box" techniques that interact with the code more directly.

Topics covered will include:

* Using Cucumber to perform black-box testing.
* Using RSpec to perform white-box testing

Vlcsnap 2015 04 29 11h01m54s209 thumb
Rating: Everyone
Viewed 1,446 times
Recorded at: April 22, 2015
Date Posted: April 29, 2015

RSpec is often described with the word “magic” by both its users and its detractors.

Understanding how RSpec matchers, doubles, and specifications work will help you as an RSpec user. You will be able to take advantage of RSpec’s flexibility to make your tests clearer and more expressive. You’ll also get some exposure to new RSpec features, like compound matchers.

Walking through a typical RSpec example, we’ll show the RSpec internals as RSpec evaluates matchers and uses doubles. You’ll leave with a better understanding of how to harness RSpec in your own tests.

Vlcsnap 2014 05 27 08h41m18s91 thumb
Rating: Everyone
Viewed 2,169 times
Recorded at: April 25, 2014
Date Posted:

Don’t you hate when testing takes 3x as long because your specs are hard to understand? Or when testing conditional permutation leads to a ton of duplication? Following a few simple patterns, you can easily take a bloated spec and make it readable, DRY and simple to extend. This workshop is a refactor kata. We will take a bloated sample spec and refactor it to something manageable, readable and concise.

984 goruco2012 maintaining balance while reducing duplication part ii thumb 0002 thumb
Rating: Everyone
Viewed 1,831 times
Recorded at: June 23, 2012
Date Posted: July 1, 2012

This talk is a sequel to the talk David gave at RubyConf 2010, and will focus on refactorings that we rely on to reduce duplication, and their implications, both positive and negative.