spec/sugar-high/numeric_spec.rb in sugar-high-0.6.3 vs spec/sugar-high/numeric_spec.rb in sugar-high-0.7.0

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' require 'sugar-high/numeric' class Numeric - include NumberDslExt -end + include NumberDslExt +end module Num extend NumericCheckExt end @@ -22,22 +22,22 @@ it '12.3 is numeric' do Num.numeric?(12.3).should be_true end end - + describe 'check_numeric!' do it 'string "x1" is not numeric' do lambda {Num.check_numeric!("x0")}.should raise_error end it '123 is numeric' do lambda {Num.check_numeric!(123)}.should_not raise_error end end end - + describe 'NumberDslExt' do describe '#hundred' do it '2 hundred is 200' do 2.hundred.should == 200 end @@ -47,6 +47,5 @@ 3.thousand.should == 3000 end end end end - \ No newline at end of file