rspec: shared_examples

Post on 11-Jul-2015

828 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

RSpec: Core shared_examples[_for]

Why to use these?

DRY | MOIST DON'T REPEAT YOURSELF | MAKE OBVIOUSLY IDENTICAL STATEMENTS TWICE

○ Mixins○ Subclasses○ Controllers

Where do I put these?

Where do I put these?

● Anywhere in the 'spec/' directory

Where do I put these?

● Anywhere in the 'spec/' directory

● Conventionally in 'spec/support/shared_examples/'

Basics

Providing context

Passing parameters

Add specs for a new Xml Remap

Thank You

See: https://www.relishapp.com/rspec

top related