Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Web testing strategy

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Web testing strategy

Avatar for Masafumi Okura

Masafumi Okura

June 26, 2019
Tweet

More Decks by Masafumi Okura

Other Decks in Programming

Transcript

  1. ϖʔδωʔγϣϯͷ۩ମྫ # Bad @books = create_list(:book, 11) visit books_url expect(page).not_to

    have_content(‘Book11’) # Good @book = create_list(:book, 2) PER_PAGE = 1 # తͳ΍ͭ visit books_url expect(page).not_to have_content(‘Book2’)
  2. ςετ͕ࠔ೉ͳίʔυྫ # foo.rb class Foo def do_something(arg1, arg2, arg3 =

    nil, params = {}) end end # foo_spec.rb context ‘when arg1 is :hoge’ do context ‘when arg2 is…
  3. ςετ͕༰қͳίʔυྫ # foo.rb class Foo def do_something(arg1) bar.do_another(arg2) end end

    # foo_spec.rb context ‘when arg1 is :hoge’ do before { allow(bar).to receive(:do_another) { hoge }