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

2 years ago
123456789101112131415161718192021
  1. $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../../lib")
  2. require 'calculator'
  3. Before do
  4. @calc = Calculator.new
  5. end
  6. After do
  7. end
  8. Given 'كتابة $n في الآلة الحاسبة' do |n|
  9. @calc.push n.to_i
  10. end
  11. When(/يتم الضغط على (.+)/) do |op|
  12. @result = @calc.send op
  13. end
  14. Then(/يظهر (.*) على الشاشة/) do |result|
  15. expect(@result).to eq(result)
  16. end

No Description

Contributors (1)