spec/dsl_spec.rb in benches-0.1.0 vs spec/dsl_spec.rb in benches-0.2.0
- old
+ new
@@ -1,73 +1,5 @@
require 'spec_helper'
-describe 'routine' do
- context 'no method arguments' do
- it 'returns benchmark result' do
- expect((routine 'test_string', 'benches 20 reps of split').first).to be_a Benchmark::Tms
- end
- end
-
- context 'method has integer argument' do
- it 'returns benchmark result' do
- expect((routine 'test_string', "benches 20 reps of insert with (0,a)").first).to be_a Benchmark::Tms
- end
- end
-
- context 'method has float argument' do
- it 'returns benchmark result' do
- expect((routine 32.444, 'benches 20 reps of + with (4.43)').first).to be_a Benchmark::Tms
- end
- end
-end
-
-describe 'float?' do
- context 'input string contains only a float' do
- it 'returns true' do
- expect(float?('32.555')).to eql true
- end
- end
-
- context 'input string contains letters and numbers' do
- it 'returns false' do
- expect(float?('ab321')).to eql false
- end
- end
-
- context 'input string contains an integer' do
- it 'returns false' do
- expect(float?('32')).to eql false
- end
- end
-
- context 'input string does not contain any numbers' do
- it 'returns false' do
- expect(float?('stuff')).to eql false
- end
- end
-end
-
-describe 'integer?' do
- context 'input string contains only an integer' do
- it 'returns true' do
- expect(integer?('32')).to eql true
- end
- end
-
- context 'input string contains a float' do
- it 'returns false' do
- expect(integer?('32.423')).to eql false
- end
- end
-
- context 'input string contains letters and numbers' do
- it 'returns false' do
- expect(integer?('abc123')).to eql false
- end
- end
-
- context 'input string does not contain any numbers' do
- it 'returns false' do
- expect(integer?('abc')).to eql false
- end
- end
+describe 'subject' do
+
end