タグ

railsとtestに関するsaitoudaitokuのブックマーク (2)

  • RSpecよりShoulda、fixturesよりヘルパーとMocha - Unexplored Rails

    RailsでBDDと言ったらRSpecが圧倒的にポピュラーですね。でもRSpecに馴染めないという人はいませんか?私はx.should == yという書き方からKernelを拡張する実装まで、何もかも独自路線でいく個性の強さについていけません。 しかし同時にTest::Unitの垢抜けなさにもうんざりしていて、何かいいフレームワークはないかと思っていた時にShouldaに出会いました。contextを入れ子にできる柔軟性や、既存のTest::Unitインスタンスの中に書けるとっつきやすさはとても魅力的に見えました。そしてその日からShouldaでテストを書き始めました。 このエントリでは、Shouldaを中心にヘルパーやMochaを使った気持ちのいい開発手法を紹介します。 Shouldaは柔軟でとっつきやすい RSpecの最大の魅力はその書き方にあると思います。しかしその書き方を利用するた

    RSpecよりShoulda、fixturesよりヘルパーとMocha - Unexplored Rails
  • Introducing rbehave

    rbehave is a framework for defining and executing application requirements. Using the vocabulary of behaviour-driven development, you define a feature in terms of a Story with Scenarios that describe how the feature behaves. Using a minimum of syntax (a few “quotes” mostly), this becomes an executable and self-describing requirements document. BDD has been around in the Ruby world for a while now,

  • 1