Module: RSpec::Rails::BrowserSimulators

Extended by:
ActiveSupport::Concern
Included in:
ControllerExampleGroup, HelperExampleGroup, MailerExampleGroup, RequestExampleGroup, ViewExampleGroup
Defined in:
lib/rspec/rails/browser_simulators.rb

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rspec/rails/browser_simulators.rb', line 16

def self.included(mod)
  mod.instance_eval do
    def webrat(&block)
      block.call if defined?(Webrat)
    end

    def capybara(&block)
      block.call if defined?(Capybara)
    end
  end
end