Permalink
Browse files

adding binary_expression_factory_spec

  • Loading branch information...
1 parent c0d6fef commit 39a1f63e2755df4c0277bbd36d0443836a3022f8 @sergioazevedo committed Mar 30, 2012
Showing with 27 additions and 0 deletions.
  1. +27 −0 spec/formula_dsl/binary_expression_factory_spec.rb
@@ -0,0 +1,27 @@
+#encoding: utf-8
+require 'spec_helper'
+
+module FormulaDSL
+ describe BinaryExpressionFactory do
+ subject{ BinaryExpressionFactory }
+
+ specify { should respond_to(:new) }
+
+ it "should be return a ADDITON Proc to + operator " do
+ subject.new(:+).should be == FormulaDSL::BinaryOperations::ADDITION
+ end
+
+ it "should be return a SUBTRACTION Proc to - operator " do
+ subject.new(:-).should be == FormulaDSL::BinaryOperations::SUBTRACTION
+ end
+
+ it "should be return a MULTIPLICATON Proc to * operator " do
+ subject.new(:*).should be == FormulaDSL::BinaryOperations::MULTIPLICATION
+ end
+
+ it "should be return a DIVISION Proc to / operator " do
+ subject.new(:/).should be == FormulaDSL::BinaryOperations::DIVISION
+ end
+
+ end
+end

0 comments on commit 39a1f63

Please sign in to comment.