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.

laskin_steps.rb 510 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 'laskin'
  9. Before do
  10. @laskin = Laskin.new
  11. end
  12. After do
  13. end
  14. Given(/että olen syöttänyt laskimeen luvun (\d+)/) do |n|
  15. @laskin.pinoa n.to_i
  16. end
  17. When(/painan "(\w+)"/) do |op|
  18. @tulos = @laskin.send op
  19. end
  20. Then(/laskimen ruudulla pitäisi näkyä tulos (.*)/) do |tulos|
  21. expect(@tulos).to eq(tulos.to_f)
  22. end

No Description

Contributors (1)