summaryrefslogtreecommitdiffstats
path: root/test/rails/ast.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-18 17:32:46 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-18 17:32:46 +0000
commit53a469c0000eb1f487eab456c0986d427d714bd7 (patch)
treedd0f8c72a73f18371f50fa5559bb43d10b7301b5 /test/rails/ast.rb
parentd5569bcf30ad40b1780c1550368455127114cdd2 (diff)
downloadpuppet-53a469c0000eb1f487eab456c0986d427d714bd7.tar.gz
puppet-53a469c0000eb1f487eab456c0986d427d714bd7.tar.xz
puppet-53a469c0000eb1f487eab456c0986d427d714bd7.zip
Fixing #703, mostly. You still cannot do multi-condition queries, but you can at least query against any parameter, and matching any value is sufficient for a match, so the tags work fine.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2705 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/rails/ast.rb')
-rwxr-xr-xtest/rails/ast.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/rails/ast.rb b/test/rails/ast.rb
index 0493237f5..b205aa0d5 100755
--- a/test/rails/ast.rb
+++ b/test/rails/ast.rb
@@ -30,15 +30,14 @@ class TestRailsAST < PuppetTest::TestCase
code = nil
str = nil
- # We don't support anything but the title in rails right now
+ # We don't support more than one search criteria at the moment.
retval = nil
bad = false
# Figure out if the search is for anything rails will ignore
- string.scan(/(\w+) [!=]= \w+/) do |s|
- unless s[0] == "title"
- bad = true
- break
- end
+ if string =~ /\band\b|\bor\b/
+ bad = true
+ else
+ bad = false
end
# And if it is, make sure we throw an error.
@@ -54,7 +53,7 @@ class TestRailsAST < PuppetTest::TestCase
end
assert_nothing_raised("Could not find resource") do
retval = Puppet::Rails::Resource.find(:all,
- :include => :param_values,
+ :include => {:param_values => :param_name},
:conditions => str)
end