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 530 B

2 years ago
12345678910111213141516171819202122232425262728
  1. begin
  2. require 'rspec/expectations'
  3. rescue LoadError
  4. require 'spec/expectations'
  5. end
  6. require 'cucumber/formatter/unicode'
  7. $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../../lib")
  8. require 'calculator'
  9. Before do
  10. @calc = Calculator.new
  11. end
  12. After do
  13. end
  14. Angenommen(/ich habe (\d+) in den Taschenrechner eingegeben/) do |n|
  15. @calc.push n.to_i
  16. end
  17. Wenn(/ich (\w+) drücke/) do |op|
  18. @result = @calc.send op
  19. end
  20. Dann(/sollte das Ergebniss auf dem Bildschirm (.*) sein/) do |result|
  21. expect(@result).to eq(result.to_f)
  22. end

No Description

Contributors (1)