Hi folks,
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
before do
if required_tools_not_installed
pending 'not running on this platform'
end
end
it 'should do something' do
1.should == 1
end
end
Cheers,
Wincent
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users