Sha256: 41f1dccac1bbf04a11c7d1250a2a593c1eb51b7a7bf19873c1934b986d88ca90

Contents?: true

Size: 942 Bytes

Versions: 14

Compression:

Stored size: 942 Bytes

Contents

Then /^the conclusion of the committee should be a vector with "(.*)" items$/ do |count|
  vector = @report.conclusion
  vector.size.should == count.to_i
end

Then /^the conclusion of the committee should be a vector with value "(.*)" and position for key "(.*)"$/ do |value, key|
  vector = @report.conclusion
  position = BrighterPlanet::Purchase.key_map.index key
  compare_values vector[position], value
end

Then /^the conclusion of the committee should be a square matrix with "(\d+)" rows and columns$/ do |num|
  matrix = @report.conclusion
  matrix.row_size.should == num.to_i
  matrix.should be_square
end

Then /^the conclusion of the committee should be a vector with values "(.*)"$/ do |column_values|
  column_values = column_values.split(/,/).map(&:to_f)
  vector = @report.conclusion
  vector = vector.row(0) if vector.is_a? Matrix  #some vectors are single-row matrices

  vector.should have_column_values(column_values)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
purchase-1.0.15 features/step_definitions/matrix_steps.rb
purchase-1.0.14 features/step_definitions/matrix_steps.rb
purchase-1.0.13 features/step_definitions/matrix_steps.rb
purchase-1.0.12 features/step_definitions/matrix_steps.rb
purchase-1.0.11 features/step_definitions/matrix_steps.rb
purchase-1.0.10 features/step_definitions/matrix_steps.rb
purchase-1.0.9 features/step_definitions/matrix_steps.rb
purchase-1.0.8 features/step_definitions/matrix_steps.rb
purchase-1.0.7 features/step_definitions/matrix_steps.rb
purchase-1.0.6 features/step_definitions/matrix_steps.rb
purchase-1.0.5 features/step_definitions/matrix_steps.rb
purchase-1.0.3 features/step_definitions/matrix.rb
purchase-1.0.2 features/step_definitions/matrix.rb
purchase-1.0.1 features/step_definitions/matrix.rb