test/unitwise_test.rb in unitwise-1.0.2 vs test/unitwise_test.rb in unitwise-1.0.3
- old
+ new
@@ -17,9 +17,18 @@
it "must return results" do
Unitwise.search('foo').must_be_instance_of(Array)
end
end
+ describe 'valid?' do
+ it 'should reutrn true for valid unit strings' do
+ Unitwise.valid?('millimeter').must_equal true
+ end
+ it 'should return false for invalid unit strings' do
+ Unitwise.valid?('foo').must_equal false
+ end
+ end
+
it "should have a path" do
Unitwise.path.must_match(/unitwise$/)
end
end