features/step_definitions/parser_steps.rb in csl-1.0.0.pre21 vs features/step_definitions/parser_steps.rb in csl-1.0.0.pre22

- old
+ new

@@ -2,10 +2,12 @@ When /^I parse the CSL string(?: in the (\w+) scope)?$/ do |scope, string| @csl = CSL.parse string, CSL.const_get(scope || 'Node') end Then /^(?:the )?(\w+[\?!]?) should be "([^"]*)"$/ do |name, expected| - @csl.send(name).to_s.should == expected + actual = @csl.send(name) + actual = !!actual if expected =~ /^true|false$/ + actual.to_s.should == expected end Then /^the (\w+) (\w+) should be "([^"]*)"$/ do |outer, inner, expected| @csl.send(outer).send(inner).to_s.should == expected end