????Rspec ??Ruby?????????????????????????锟�??????屑??????????????y????
??????????????????
?????????????????????????????纾� testlink ???????????????????????????????????????????????纾� TestNg ???????????????????????????
????Rspec??????
???????????Rspec??????? describe??it ???????楣�??
??????????????Rspec????? BDD ?????????????写????????? ??????????testcase?? ?????
????describe?????????describe??it??????????????
????it???????????????????????????????????????????????????Assertion?????????????
??????????????
????????????????????????????????????路?????????????????

 

# encoding: utf-8
describe 'PHILIPS??? - ???????' do
# Rspec????????DSL ?????锌?????????Ruby???? ???????echo()????
def echo(input)
puts input
end
# Rspec??TestNG/JUnit??? ???????before/after??hook
# ?????梅?围????????describe
# before??it?????????
before(:each) do
echo '--- ??????尾??? ---'
end
# after??it??????????
after(:each) do
echo "--- ???????尾??? --- "
end
it "e?????????? - ?????? - ???????" do
echo '???? - ?????? - ??????'
end
# describe??????it???榘�?? ???? "e?????" ?? "???????"
# describe????????? ????????????????? ???????????????
describe '???????' do
describe '??????' do
# it?????????????????testcase
it '??????????' do
echo 'min-1-2-3-4-5-max'
end
it '????????贸???10000' do
echo 'no more than 1w'
end
it "??????????" do
echo 'white light'
end
end
describe '??????' do
it "?????????" do
echo '???????'
end
it "?小???绮�????0.000001??" do
echo '0.000001kwh'
end
end
end