Sha256: 700bf9756ab579b29e850dabd60230287290e85f1c293e094d7d7b81ef224ff9
Contents?: true
Size: 577 Bytes
Versions: 4
Compression:
Stored size: 577 Bytes
Contents
require 'spec' $:.unshift(File.dirname(__FILE__) + '/../../lib') require 'cucumber/formatters/unicode' $KCODE = 'e' require 'calculator' Before do @calc = Calculator.new end After do end Given "$n を入力" do |n| @calc.push n.to_i end When /(\w+) ボタンを押した/ do |op| @result = @calc.send op end Then /結果は (.*) を表示/ do |result| @result.should == result.to_f end Then /結果のクラスは (\w*)/ do |class_name| @result.class.name.should == class_name end Given /it should rain on (\w+)/ do |day| @calc.rain?(day).should == true end
Version data entries
4 entries across 4 versions & 2 rubygems