タグ

ブックマーク / relishapp.com (1)

  • Syntax Configuration - RSpec Expectations - RSpec - Relish

    The primary syntax provided by rspec-expectations is based on the expect method, which explicitly wraps an object or block of code in order to set an expectation on it. There's also an older should-based syntax, which relies upon should being monkey-patched onto every object in the system.However, this syntax can at times lead to some surprising failures, since RSpec does not own every object in t

    kiyo_hiko
    kiyo_hiko 2015/08/17
    should記法はdeprecated。expect使おうってことらしい。 // 例えば、<old> last_response.body.should == 'HTML body' // <new> expect(last_response.body).to eq 'HTML body'
  • 1