How to define instance variable of any class in rspec test
subject { described_class.new(response, token) } subject.instance_variable_set(:@response, { 'some response' }) and in test suite you can use any instance method where this variable is used.
subject { described_class.new(response, token) } subject.instance_variable_set(:@response, { 'some response' }) and in test suite you can use any instance method where this variable is used.
Ostatnio miałem problem do rozwiązania – testy akceptacyjne i przetestować dodawanie treści do opisu produktu. Copywriter ma do dyspozycji edytor HTML, a żeby dodać treść do edytora w testach nalezało użyć: page.execute_script(’$(„#foo_description_raw”).tinymce().setContent(„Pants are pretty...
Najnowsze komentarze