[rspec-users] Conditionally turning some specs on and off depending on runtime platform
win at wincent.com
Thu Sep 25 16:50:23 EDT 2008
Wondering what the best (that is, neatest and most supported) way to
conditionally turn off some specs depending on the runtime platform.
Background: some of my specs call out to some third-party tools that
may or may not be installed on the system. I'd like to check for the
presence of those tools and gracefully skip those specs rather than
just bombing out.
The following trick, calling "pending" from inside the before block,
effectively does what I want. But I'm wondering if I can count on this
behaviour going forward? What do you think?
describe 'Something' do
pending 'not running on this platform'
it 'should do something' do
1.should == 1
More information about the rspec-users