You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a test, there are generally 3 parts - arrange, act, assert.
Arrange refers to the setup necessary for the test happens - setting up objects, assigning values, etc.
Act is the actual action - the main line that produces the effect the test is checking.
Assert refers to the 'test' part, where you're checking the output of the action and the desired result.
Keep these sections separated by a space.
Let's have a look at one of the tests you've written. Right now, all the lines are not separated in any way. Here's how to space them apart according to the scheme I've mentioned above:
it'returns a hash with name, age, place when called to_hash'dothe_hash=user.to_hashexpect(the_hash).tobe_a(Hash)expect(the_hash).toeq({name: 'Some Name',age: '21',place: 'Some Place'})end
The text was updated successfully, but these errors were encountered:
When writing a test, there are generally 3 parts - arrange, act, assert.
Keep these sections separated by a space.
Let's have a look at one of the tests you've written. Right now, all the lines are not separated in any way. Here's how to space them apart according to the scheme I've mentioned above:
The text was updated successfully, but these errors were encountered: