Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テスト書くときは、あまりメソッドチェインさせないですね。 #8

Open
tatsuro-ueda opened this issue Feb 12, 2013 · 0 comments

Comments

@tatsuro-ueda
Copy link
Owner

基本的なテストはGiven(前提条件)、When(入力/振舞)、Then(出力/評価)を明確に分けて書くようにしたほうが、
仕様や振舞がわかりやすくなっていいかなと思います。

このappendメソッドのexampleは、

Given: before(:all)内のsetup
When: @feed1.append(@feed3)
Then:  @feed1.items.length.should == 10  

といった感じでしょうか。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant