Skip to content

Commit

Permalink
Store all filtered specs inside a Set (instead of hash)
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 29, 2013
1 parent f4dc25c commit 5a3771b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/spec_helper.rb
@@ -1,5 +1,6 @@
require 'opal'
require 'file'
require 'set'
require 'opal-parser'
require 'mspec'
require 'mspec/mock_install_method_patch'
Expand All @@ -22,23 +23,23 @@ def self.main
end

def initialize
@filters = {}
@filters = Set.new
end

def register
MSpec.register :exclude, self
end

def ===(description)
@filters.has_key? description
@filters.include? description
end

def register_filters(description, block)
instance_eval(&block)
end

def fails(description)
@filters[description] = true
@filters << description
end
end

Expand Down

0 comments on commit 5a3771b

Please sign in to comment.