Professional Documents
Culture Documents
Testdriven Development - Ruby: - BDD Functional Testing
Testdriven Development - Ruby: - BDD Functional Testing
---------
BDD
Functional testing.
V2solutions Inc.
Bangalore
5th Oct 2010
TDD (Test driven development)
Add/ Update
Expectations
Add/ Update
Code(Functionality)
Test::Unit - Ruby UnitTesting Framework.
http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Un
it.html
Require 'test/unit'
class MachineTest < Test::Unit::TestCase
def setup
end
def teardown
end
end
Create a machine, which is a … ,
Tea maker
Can make tea
Add sugar
Alert on overload
Tests
Assertions
Methods
assert assert_block assert_equal assert_in_delta assert_instance_of
assert_kind_of assert_match assert_nil assert_no_match assert_not_equal
assert_not_nil assert_not_same assert_nothing_raised
assert_nothing_thrown assert_operator assert_raise assert_raises
assert_respond_to assert_same assert_send assert_throws build_message
flunk
Runners
require 'test/unit/ui/console/testrunner'
Test::Unit::UI::Console::TestRunner.run(MachineTest)
Or Just require the test file :)
Test suit
To be discussed,
BDD
Rspec
Cucumber
Functional testing in Rails
Thank You :)
shilesh