Sha256: 357b36e6b452bc7ee19a29905103c1db860c6b5fd31e8d58b0deb174c6be20e4

Contents?: true

Size: 1008 Bytes

Versions: 21

Compression:

Stored size: 1008 Bytes

Contents

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
end

Then /^the (\w+) (\w+) should be "([^"]*)"$/ do |outer, inner, expected|
  @csl.send(outer).send(inner).to_s.should == expected
end

Then /^the attribute "([^"]*)" should be "([^"]*)"$/ do |name, expected|
  @csl[name.to_sym].should == expected
end

Then /^the node should have (\d+) (\w+)$/ do |length, name|
  @csl.send(name).length.should == length.to_i
end

Then /^the (\w+) number (\d+) should have the attribute "([^"]*)" set to "([^"]*)"$/ do |name, offset, attribute, expected|
  @csl.send("#{name}s")[offset.to_i - 1][attribute.to_sym].should == expected
end

Then /^the (\w+) number (\d+) should( not)? be a (\w+)$/ do |name, offset, negate, predicate|
  @csl.send("#{name}s")[offset.to_i - 1].send("#{predicate}?").should == negate.nil?
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
csl-1.0.0.pre21 features/step_definitions/parser_steps.rb
csl-1.0.0.pre20 features/step_definitions/parser_steps.rb
csl-1.0.0.pre19 features/step_definitions/parser_steps.rb
csl-1.0.0.pre18 features/step_definitions/parser_steps.rb
csl-1.0.0.pre17 features/step_definitions/parser_steps.rb
csl-1.0.0.pre16 features/step_definitions/parser_steps.rb
csl-1.0.0.pre15 features/step_definitions/parser_steps.rb
csl-1.0.0.pre14 features/step_definitions/parser_steps.rb
csl-1.0.0.pre13 features/step_definitions/parser_steps.rb
csl-1.0.0.pre12 features/step_definitions/parser_steps.rb
csl-1.0.0.pre11 features/step_definitions/parser_steps.rb
csl-1.0.0.pre10 features/step_definitions/parser_steps.rb
csl-1.0.0.pre9 features/step_definitions/parser_steps.rb
csl-1.0.0.pre8 features/step_definitions/parser_steps.rb
csl-1.0.0.pre7 features/step_definitions/parser_steps.rb
csl-1.0.0.pre6 features/step_definitions/parser_steps.rb
csl-1.0.0.pre5 features/step_definitions/parser_steps.rb
csl-1.0.0.pre4 features/step_definitions/parser_steps.rb
csl-1.0.0.pre3 features/step_definitions/parser_steps.rb
csl-1.0.0.pre2 features/step_definitions/parser_steps.rb