Sha256: 7581a5e1616f826615264d312548a5b9964d8db2f602bd6d0acfecb2e51954a3

Contents?: true

Size: 504 Bytes

Versions: 185

Compression:

Stored size: 504 Bytes

Contents

require 'mspec/runner/filters/match'

class TagFilter
  def initialize(what, *tags)
    @what = what
    @tags = tags
  end

  def load
    desc = MSpec.read_tags(@tags).map { |t| t.description }

    @filter = MatchFilter.new(@what, *desc)
    @filter.register
  end

  def unload
    @filter.unregister if @filter
  end

  def register
    MSpec.register :load, self
    MSpec.register :unload, self
  end

  def unregister
    MSpec.unregister :load, self
    MSpec.unregister :unload, self
  end
end

Version data entries

185 entries across 161 versions & 4 rubygems

Version Path
rhodes-5.5.18 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.17 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.15 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.0.22 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.2 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.0.7 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.0.3 lib/extensions/mspec/mspec/runner/filters/tag.rb
rhodes-5.5.0 lib/extensions/mspec/mspec/runner/filters/tag.rb
tauplatform-1.0.3 lib/extensions/mspec/mspec/runner/filters/tag.rb
mspec-1.9.1 lib/mspec/runner/filters/tag.rb
mspec-1.9.0 lib/mspec/runner/filters/tag.rb
tauplatform-1.0.2 lib/extensions/mspec/mspec/runner/filters/tag.rb
tauplatform-1.0.1 lib/extensions/mspec/mspec/runner/filters/tag.rb
mspec-1.8.0 lib/mspec/runner/filters/tag.rb
mspec-1.7.0 lib/mspec/runner/filters/tag.rb
mspec-1.6.0 lib/mspec/runner/filters/tag.rb
mspec-1.5.21 lib/mspec/runner/filters/tag.rb
mspec-1.5.20 lib/mspec/runner/filters/tag.rb
mspec-1.5.19 lib/mspec/runner/filters/tag.rb
mspec-1.5.18 lib/mspec/runner/filters/tag.rb