Sha256: d9a543c419b182a933dab1e403ecbe2d7e71c36665532789a893ca7d18203cfb

Contents?: true

Size: 898 Bytes

Versions: 3

Compression:

Stored size: 898 Bytes

Contents

require 'media_wiki'

require 'nokogiri'
require 'equivalent-xml/rspec_matchers'

RSpec.configure { |config|
  %w[expect mock].each { |what|
    config.send("#{what}_with", :rspec) { |c| c.syntax = [:should, :expect] }
  }

  config.include(Module.new {
    def data(file)
      File.join(File.dirname(__FILE__), 'data', file)
    end
  })

  config.alias_example_group_to :describe_fake, begin
    require 'media_wiki/fake_wiki'

    { fake: true }.tap { |filter|
      MediaWiki::FakeWiki::RSpecAdapter.enhance(config, filter) }
  end

  config.alias_example_group_to :describe_live, begin
    require 'media_wiki/test_wiki/rspec_adapter'
  rescue LoadError
    { skip: 'MediaWiki::TestWiki not available'.tap { |msg|
      warn "#{msg}. Install the `mediawiki-testwiki' gem." } }
  else
    { live: true }.tap { |filter|
      MediaWiki::TestWiki::RSpecAdapter.enhance(config, filter) }
  end
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mediawiki-gateway-1.1.0 spec/spec_helper.rb
mediawiki-gateway-1.0.0 spec/spec_helper.rb
mediawiki-gateway-1.0.0.rc1 spec/spec_helper.rb