Sha256: 471342398084cf5d6ec76fb4c1204be2c6a4fdea58a057494f93fba45b7b3152

Contents?: true

Size: 472 Bytes

Versions: 175

Compression:

Stored size: 472 Bytes

Contents

require 'mspec/guards/version'

class BugGuard < VersionGuard
  def initialize(bug, version)
    @bug = bug
    @version = SpecVersion.new version, true
    self.parameters = [@bug, @version]
  end

  def match?
    return false if MSpec.mode? :no_ruby_bug
    standard? && ruby_version <= @version
  end
end

class Object
  def ruby_bug(bug, version)
    g = BugGuard.new bug, version
    g.name = :ruby_bug
    yield if g.yield? true
  ensure
    g.unregister
  end
end

Version data entries

175 entries across 151 versions & 4 rubygems

Version Path
rhodes-1.4.1 res/generators/templates/spec/app/mspec/guards/bug.rb
rhodes-1.4.0 res/generators/templates/spec/app/mspec/guards/bug.rb
rhodes-1.4.0 spec/framework_spec/app/mspec/guards/bug.rb
mspec-1.5.16 lib/mspec/guards/bug.rb
mspec-1.5.15 lib/mspec/guards/bug.rb
mspec-1.5.14 lib/mspec/guards/bug.rb
mspec-1.5.13 lib/mspec/guards/bug.rb
rhodes-1.2.2 spec/app/mspec/guards/bug.rb
rhodes-framework-1.2.1 spec/app/mspec/guards/bug.rb
rhodes-framework-1.2.0 spec/app/mspec/guards/bug.rb
mspec-1.5.10 lib/mspec/guards/bug.rb
mspec-1.5.11 lib/mspec/guards/bug.rb
mspec-1.5.12 lib/mspec/guards/bug.rb
rhodes-framework-1.1.0 spec/app/mspec/guards/bug.rb
rhodes-framework-1.1.1 spec/app/mspec/guards/bug.rb