You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

calculator_steps.rb 369 B

2 years ago
123456789101112131415161718
  1. $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../../lib")
  2. require 'calculadora'
  3. Before do
  4. @calc = Calculadora.new
  5. end
  6. Donat(/que he introduït (\d+) a la calculadora/) do |n|
  7. @calc.push n.to_i
  8. end
  9. Quan(/premo el (\w+)/) do |op|
  10. @result = @calc.send op
  11. end
  12. Aleshores(/el resultat ha de ser (\d+) a la pantalla/) do |result|
  13. expect(@result).to eq(result)
  14. end

No Description

Contributors (1)