Sha256: 74e55d962e83ca9593306335da654a0b81d4d04af0e91ea468599d644a728fe0

Contents?: true

Size: 898 Bytes

Versions: 13

Compression:

Stored size: 898 Bytes

Contents

module MediawikiSelenium
  module RSpec
    module Environment
      # Sets up and returns a new default environment.
      #
      # @return [Environment]
      #
      def mw
        @_mw ||= MediawikiSelenium::Environment.load_default.extend(
          MediawikiSelenium::ApiHelper,
          MediawikiSelenium::PageFactory,
          MediawikiSelenium::ScreenshotHelper,
          MediawikiSelenium::UserFactoryHelper
        )
      end

      private

      # Allow for indirect calls to the {Environment} object.
      #
      # @see mw
      #
      def method_missing(name, *args, &block)
        mw.respond_to?(name) ? mw.__send__(name, *args, &block) : super
      end

      # Allow for indirect calls to the {Environment} object.
      #
      # @see mw
      #
      def respond_to_missing?(name, include_all = false)
        mw.respond_to?(name) || super
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mediawiki_selenium-1.8.1 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.8.0 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.7.4 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.7.3 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.7.2 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.7.1 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.7.0 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.5 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.4 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.3 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.2 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.1 lib/mediawiki_selenium/rspec/environment.rb
mediawiki_selenium-1.6.0 lib/mediawiki_selenium/rspec/environment.rb