Sha256: dcfea106146cd43d9e0404284b2300dc86e0f00ca9ab50ebbff02939ba28a45b

Contents?: true

Size: 938 Bytes

Versions: 7

Compression:

Stored size: 938 Bytes

Contents

require 'opal/rspec/pre_require_fixes'
require 'opal/rspec/requires'
require 'opal/rspec/fixes'
require 'opal/rspec/formatter/browser_formatter'
require 'opal/rspec/runner'
require 'opal/rspec/async'

RSpec.configure do |config|
  config.default_formatter = ::RSpec::Core::Runner.non_browser? ? ::RSpec::Core::Formatters::ProgressFormatter : ::Opal::RSpec::BrowserFormatter

  # Have to do this in 2 places. This will ensure the default formatter gets the right IO, but need to do this here for custom formatters
  # that will be constructed BEFORE Runner.autorun runs (see runner.rb)
  _, stdout = ::RSpec::Core::Runner.get_opal_closed_tty_io
  config.output_stream = stdout

  # This shouldn't be in here, but RSPec uses undef to change this configuration and that doesn't work well enough yet
  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  # Legacy helpers
  config.include Opal::RSpec::AsyncHelpers
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
opal-rspec-0.6.2 opal/opal/rspec.rb
opal-rspec-0.6.1 opal/opal/rspec.rb
opal-rspec-0.6.0 opal/opal/rspec.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec.rb
opal-connect-rspec-0.5.0 opal/opal/rspec.rb
opal-rspec-0.5.0 opal/opal/rspec.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec.rb