Sha256: b5dfd88d043f25cfb476bacdf7eb721ebfe34e340e85439dcc0c79b72d07f87f

Contents?: true

Size: 705 Bytes

Versions: 3

Compression:

Stored size: 705 Bytes

Contents

unless Opal::RSpec::Compatibility.undef_within_exec_works?
  module ::RSpec::Expectations::Syntax
    def disable_expect(syntax_host=::RSpec::Matchers)
      return unless expect_enabled?(syntax_host)

      # undef not working on Opal 0.8
      # syntax_host.module_exec do
      #   undef expect
      # end
      syntax_host.remove_method(:expect)
    end

    def disable_should(syntax_host=default_should_host)
      return unless should_enabled?(syntax_host)

      # undef not working on Opal 0.8
      # syntax_host.module_exec do
      #   undef should
      #   undef should_not
      # end
      syntax_host.remove_method(:should)
      syntax_host.remove_method(:should_not)
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
opal-connect-rspec-0.5.0 opal/opal/rspec/fixes/rspec/expectations/syntax.rb
opal-rspec-0.5.0 opal/opal/rspec/fixes/rspec/expectations/syntax.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/fixes/rspec/expectations/syntax.rb