Couldn't you do something along the lines of
if RUBY_PLATFORM =~ /mac/
Capybara.javascript_driver = :firefox
else
Capybara.javascript_driver = :webkit
end
in spec/support/env.rb?
I don't have a mac, so I'm not sure what the value of RUBY_PLATFORM
should be, but by running puts RUBY_PLATFORM
in irb
, I'm sure you can figure out an appropriate value.