module RSpec::Rails::SystemExampleGroup

@api public Container class for system tests

Public Class Methods

new(*args, &blk) click to toggle source
Calls superclass method
# File lib/rspec/rails/example/system_example_group.rb, line 57
def initialize(*args, &blk)
  super(*args, &blk)
  @driver = nil
end

Public Instance Methods

app() click to toggle source

Delegates to `Rails.application`.

# File lib/rspec/rails/example/system_example_group.rb, line 46
def app
  ::Rails.application
end
driven_by(*args, &blk) click to toggle source
# File lib/rspec/rails/example/system_example_group.rb, line 62
def driven_by(*args, &blk)
  @driver = ::ActionDispatch::SystemTestCase.driven_by(*args, &blk).tap(&:use)
end
method_name() click to toggle source

@private

# File lib/rspec/rails/example/system_example_group.rb, line 37
def method_name
  @method_name ||= [
    self.class.name.underscore,
    RSpec.current_example.description.underscore,
    rand(1000)
  ].join("_").gsub(/[\/\.:, ]/, "_")
end
passed?() click to toggle source

for the SystemTesting Screenshot situation

# File lib/rspec/rails/example/system_example_group.rb, line 32
def passed?
  RSpec.current_example.exception.nil?
end