This repository was archived by the owner on Jul 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
The RSpec Toolbox
Benjamin Oakes edited this page Sep 7, 2012
·
46 revisions
From WindyCityRails 2012
Presenter: David Chelimsky
From @benjaminoakes:
- DRW Trading Group (hiring)
- Rspec2
- Micronaut: Each example has its own metadata
- New basis for Rspec
Basically the Command pattern:
example_group = describe Something { }example = it 'does something' { }- Used in output at command line, etc.
- rspec has formatter methods (there's an protocol with an interface)
- Example formatters:
- Documentation
- HTML
- 3rd party
-
Instafail: shows you error messages early Fuubar- nyan cat
-
- Example formatters:
- Focusing tools
-
autotest,guard-- monitor changes to files and re-run specs - Sometimes you don't want it to rerun everything again (e.g., if you TDD)... so, focus!
-
# FIXME: there's a config line that goes with this
it 'something', :focus => true do
endOr exclude stuff:
config.filter_run_excluding :slow => true
it 'something', :slow => true do
endShorthand:
# Will be default in the future...
config.treat_symbols_as_metadata_keys_with_true_values = true
it 'something', :slow do
end
it 'something', :focus do
endconditional filters
describe Thing, :if => RUBY_VERSON >= "1.9" do
enddescribe Thing, :if => ENV['GENERATE'] do
endA crowd-sourced conference wiki!
Working together is better. :)
- Speakers, for example:
- Recent Conferences
- Software
- Offline Access
- Contributors (More than 50!)
- Code Frequency

