You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So for my above condition the condition returns
"001_file.rb" =~ filter # returns 1
and for the rest of the files it return
"002_anotherfile.rb" =~ filter # 0
Ideally I would expect the find_all in the runner to return the filtered out filenames ie., leaving out "001_file.rb". But the find_all considers 1, 0 or any other value except nil as true and adds that file to the filenames list. Did anybody else faced this issue or am I missing something ??
The text was updated successfully, but these errors were encountered:
I am trying to filter out a fixture file using the filter option passed to the
SeedFu.seed(fixtures, filter)
passing regex eg: filter = /(?!001_file.rb)/
The regexp used inside seedfu runner is as given below(https://github.com/mbleigh/seed-fu/blob/master/lib/seed-fu/runner.rb)
filenames.find_all { |filename| filename =~ @filter }
So for my above condition the condition returns
"001_file.rb" =~ filter # returns 1
and for the rest of the files it return
"002_anotherfile.rb" =~ filter # 0
Ideally I would expect the find_all in the runner to return the filtered out filenames ie., leaving out "001_file.rb". But the find_all considers 1, 0 or any other value except nil as true and adds that file to the filenames list. Did anybody else faced this issue or am I missing something ??
The text was updated successfully, but these errors were encountered: