Skip to content

Instantly share code, notes, and snippets.

View Penitent0's full-sized avatar
😎

Ken Lenhart Penitent0

😎
View GitHub Profile
@Penitent0
Penitent0 / factorybot_faker_demo.md
Created September 15, 2022 22:00 — forked from jfangonilo/factorybot_faker_demo.md
FactoryBot/Faker Demo

FactoryBot/Faker Demo

For Turing BE Mod2 - MiniShop

https://github.com/turingschool-examples/mini_shop

Are you sick of writing fake data for tests? If you are, then your test files probably look something like this. This is what your index spec probably looks like for a project like MiniShop. You create 3 merchants and 3 items for each merchant and make sure those items show up on your index page...

#index_spec.rb
require "rails_helper"
@Penitent0
Penitent0 / intermission_work.md
Last active August 20, 2022 19:47
Ken Lenhart - Intermission Work

B2 Intermission Work

Answer these Check for Understanding questions as you work through the assignments.

HTML

  1. What is HTML?

Hypertext Markup Language - Markup language for describing structure and format of Web pages.

@Penitent0
Penitent0 / block_scope_examples.md
Created July 8, 2022 16:44 — forked from megstang/block_scope_examples.md
Block Scope Examples 14-19

Example 14

numbers = [1,2,3]
total = 0
numbers.each do |number|
  total += number
end

p total
@Penitent0
Penitent0 / argument_scope_examples.md
Created July 8, 2022 16:44 — forked from megstang/argument_scope_examples.md
Argument Scope Examples 10-13

Example 10

def print_variable(x)
puts x
end

print_variable(4)

Example 1

x = 10
puts x
puts y

Example 2