Sha256: 5d3c5b7c26981bdd507dee284843b2dfe4e4952d9841f3e9d90026b042b0b57d
Contents?: true
Size: 610 Bytes
Versions: 9
Compression:
Stored size: 610 Bytes
Contents
# encoding: utf-8 require 'spec/expectations' $:.unshift(File.dirname(__FILE__) + '/../../lib') require 'cucumber/formatters/unicode' require 'calculator' Before do @calc = Calculator.new end After do end Given "aku sudah masukkan $n ke kalkulator" do |n| @calc.push n.to_i end When /aku tekan (\w+)/ do |op| @result = @calc.send op end Then /hasilnya harus (.*) di layar/ do |result| @result.should == result.to_f end Then /class hasilnya harus (\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
9 entries across 9 versions & 2 rubygems