Sha256: d99b7004e9b7a0a69dd377387317227258f6f483839fbf1f845660d7761660e5

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

# Only require integration module when extensions are included.
# RSpec integration.  Add a before filter to disable Ajax before all tests.
module Ajax::RSpec::Integration
  if defined?(::RSpec)
    ::RSpec.configure do |c|
      c.include(Ajax::RSpec::Extension)
      c.before :all do
        disable_ajax
      end
    end
  elsif defined?(::Spec)
    ::Spec::Runner.configure do |c|
      c.before :all do
        disable_ajax
      end
    end
  end
end

# ActiveSupport::TestCase integration
module ActiveSupport
  class TestCase
    include Ajax::RSpec::Extension
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ajax-1.1.4 lib/ajax/rspec/integration.rb