Sha256: cfb93f21d060d0261518487c4e3260c8a19ed8e6879065c5c58a33236c708542

Contents?: true

Size: 450 Bytes

Versions: 2

Compression:

Stored size: 450 Bytes

Contents

if defined?(Capybara::Session)
  Capybara::Session.send(:include, Capybara::Flow)
  RSpec.configure do |config|
    config.before(:each, :js) do |example|
      output_path = File.join(Capybara::Flow.configuration.save_path, example.full_description.parameterize)
      page.recorder = Capybara::Flow::GifRecorder.new(output_path)
    end

    config.after(:each, :js) do
      page.recorder.add(page)
      page.recorder.generate!
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capybara-flow-0.2.2 lib/capybara/flow/hooks/rspec.rb
capybara-flow-0.2.1 lib/capybara/flow/hooks/rspec.rb