Ruby??????Rspec???
???????????? ???????[ 2013/12/16 11:12:05 ] ????????
????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
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11