2017 week 2 Flashcards

1
Q

How do you rename a heroku app from the command line?

A

heroku rename your_app_rename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Applications in Heroku consist of what 3 things?

A

Your source code, a description of any dependencies, and a Procfile.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe what a locator in Rspec is?

A

A locator allows you to find an element on a webpage and then act on it with a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When using the xpath tag, what does // mean? What would it mean if there was just / ?

A

The / refers to the root html tag

The // allows you to have access to all the html tags at once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When using xpath, how do you locate something by an attribute?

A
You put the @ sign in front
If you want to find by an id
@id
If you want to find by a class
@class
etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the current_path Capybara helper and when would you use it?

A

Assert you landed somewhere

expect(current_path).to eq rails_admin.dashboard_path
expect(current_path).to eq rails_admin.new_path(model_name: 'blog~post')
expect(current_path).to eq rails_admin.edit_path(model_name: 'blog~post', id: post.id)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between let vs let! in RSpec

A

Note that let is lazy-evaluated: it is not evaluated until the first time the method it defines is invoked.

You can use let! to force the method’s
invocation before each example

How well did you know this?
1
Not at all
2
3
4
5
Perfectly