Skip to content

Commit

Permalink
Example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Giniouxe committed May 24, 2016
1 parent f2c66a2 commit e471d08
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions example_tests.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require './microtest'

# Some test examples
class ExampleTests < Microtest

def first_test
test '0.002 equals 0.001' do
assert_in_delta(0.001, 0.002)
end
end

def second_test
test '1 is in primary numbers' do
assert_includes [1, 3, 5, 7], 1
end
end

def third_test
test 'empty string is really empty' do
assert_empty ''
end
end

def fourth_test
test 'string with whitespaces is not so empty' do
assert_empty ' '
end
end
end

0 comments on commit e471d08

Please sign in to comment.