Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #91 from ranguba/add-a-test-for-beginning-of-text-…
Browse files Browse the repository at this point in the history
…anchor-of-regexp

Add a test for beginning of text anchor (\A) of Regexp for block style
  • Loading branch information
kou committed Apr 8, 2015
2 parents 4f204e2 + 0926b4f commit 76a7f4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test-expression-builder.rb
Expand Up @@ -291,6 +291,14 @@ def test_not_match
assert_equal([],
result.collect {|record| record.key.key}.sort)
end

def test_beginning_of_text
result = @users.select do |record|
record["name"] =~ /\Ash/
end
assert_equal(["suzuki"],
result.collect {|record| record.key.key}.sort)
end
end

class QueryStringTest < self
Expand Down

0 comments on commit 76a7f4b

Please sign in to comment.