Skip to content

Commit

Permalink
updated the that operator's contains? method
Browse files Browse the repository at this point in the history
  • Loading branch information
mlcohen committed Dec 6, 2010
1 parent 44fe475 commit 192cdab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/lebowski/rspec/operators/that.rb
Expand Up @@ -96,9 +96,15 @@ def less_than?(value)

def contains?(value)
return false if value.nil?
@args.all? do |x|
value.member? x
if value.kind_of? String
return false if @args.length > 1
return value == @args[0]
elsif value.kind_of? Array
return @args.all? do |x|
value.member? x
end
end
return false
end

def matches?(value)
Expand Down

0 comments on commit 192cdab

Please sign in to comment.