This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all code from capybara master | |
module MatchersHelper | |
# Capybara::Helpers | |
def normalize_whitespace(text) | |
text.to_s.gsub(/[\s\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+/, ' ').strip | |
end | |
def to_regexp(text) | |
text.is_a?(Regexp) ? text : Regexp.escape(normalize_whitespace(text)) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -8,33 +8,21 @@ describe Sampler do | |
describe "filter" do | |
shared_examples "a sampler filter" do |hash| | |
it "should return the correct sampler" do | |
- attrs = {} | |
- filter = {} | |
- | |
- hash.each do |key, value| | |
- attrs = attrs.merge({ key => value[:real_value] }) | |
- end |