Skip to content

Commit

Permalink
Merge pull request #135 from brandenge/2301-corrections
Browse files Browse the repository at this point in the history
2301 corrections
  • Loading branch information
epintozzi authored Jan 20, 2023
2 parents cecd799 + 529d2b4 commit 82b46b1
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions command-query/exercises/cupcakes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RSpec.describe Cupcakes do
it 'has no sweetest when there are no cupcakes' do
cupcakes = Cupcake.new
cupcakes = Cupcakes.new
expect(cupcakes.sweetest).to be_nil
end

Expand All @@ -21,6 +21,6 @@
cupcakes << Cupcake.new('Caramel', 12)
cupcakes << Cupcake.new('Chocolate', 8)

expect(cupcakes.sweetest.flavor).to eq('Carrot')
expect(cupcakes.sweetest.flavor).to eq('Caramel')
end
end
2 changes: 1 addition & 1 deletion command-query/exercises/student_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
100.times { student.slack_off }
student.study

expect(student.grade).to eq('B')
expect(student.grade).to eq('D')

end
end
Expand Down
8 changes: 4 additions & 4 deletions enumerables/exercises_1/spec/reject_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
skip
words = ["pill", "bad", "finger", "cat", "blue", "dog", "table", "red"]
# Your code goes here
expected(selected).to eq(["bad", "cat", "dog", "red"])
expect(selected).to eq(["bad", "cat", "dog", "red"])
end

xit 'removes words ending in e' do
words = ["are", "you", "strike", "thinking", "belt", "piece", "warble", "sing", "pipe"]
# Your code goes here
expected(selected).to eq(["you", "thinking", "belt", "sing"])
expect(selected).to eq(["you", "thinking", "belt", "sing"])
end

xit 'removes words ending in ing' do
Expand All @@ -59,7 +59,7 @@
xit 'removes numbers' do
elements = ["cat", "dog", 23, 81.1, 56, "aimless", 43]
# Your code goes here
expected(not_numbers).to eq(["cat", "dog", "aimless"])
expect(not_numbers).to eq(["cat", "dog", "aimless"])
end

xit 'removes floats' do
Expand All @@ -83,7 +83,7 @@
xit 'removes arrays' do
elements = ["CAT", ["dog"], 23, [56, 3, 8], "AIMLESS", 43, "butter"]
# Your code goes here
expected(remaining).to eq(["CAT", 23, "AIMLESS", 43, "butter"])
expect(remaining).to eq(["CAT", 23, "AIMLESS", 43, "butter"])
end

xit 'removes hashes' do
Expand Down
2 changes: 1 addition & 1 deletion initialize/spec/ferret_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recuire 'rspec'
require 'rspec'
require_relative '../lib/ferret'

RSpec.describe Ferret do
Expand Down
2 changes: 1 addition & 1 deletion initialize/spec/groundhog_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
it 'has a name' do
gabby = Groundhog.new("Gabby")

expect(gabby.name).to be("Gabby")
expect(gabby.name).to eq("Gabby")
end

it 'can change name' do
Expand Down
2 changes: 1 addition & 1 deletion initialize/spec/narwhal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it 'exists' do
nancy = Narwhal.new({cute: true, weight: 500, name: "Nancy"})

expeec(nancy).to be_an_instance_of(Narwhal)
expect(nancy).to be_an_instance_of(Narwhal)
end

it 'has a name' do
Expand Down
2 changes: 1 addition & 1 deletion initialize/spec/octopus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

it 'can have any animal as a friend' do
eel = Eel.new("Earl")
orville = Octopus.new("Orville", nancy)
orville = Octopus.new("Orville", eel)

expect(orville.friend).to eq(eel)
end
Expand Down
2 changes: 1 addition & 1 deletion iteration/exercises/spec/inject_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,6 @@
"- blueberry, and vanilla scones (non gluten free)\n"\
"- blueberry, strawberry, and cherry parfaits (gluten free)\n"

expected(printable_menu).to eq(expected)
expect(printable_menu).to eq(expected)
end
end
2 changes: 1 addition & 1 deletion iteration/exercises/spec/max_and_min_by_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
greatest = number
end
end
expect(greatest).to eq(100000)
expect(greatest).to eq(1000000)
end

it 'test 2' do
Expand Down
4 changes: 2 additions & 2 deletions iteration/exercises/spec/select_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
sixth: "indigo",
seventh: "violet"
}
expected(greater_than_four).to eq(expected)
expect(greater_than_four).to eq(expected)
end

xit 'test 5' do
Expand Down Expand Up @@ -95,7 +95,7 @@
meals = ["chips and salsa", "chicken alfredo", "banana pudding"]
#Your Code Here

expected(two_words).to eq(["chicken alfredo", "banana pudding"])
expect(two_words).to eq(["chicken alfredo", "banana pudding"])
end

xit 'test 8' do
Expand Down
6 changes: 3 additions & 3 deletions mythical-creatures/spec/direwolf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
summer_wolf = Direwolf.new('Summer', "Winterfell")
lady_wolf = Direwolf.new('Lady', "Winterfell")
sansa_stark = Stark.new('Sansa')
john_stark = Stark.new('Jon')
jon_stark = Stark.new('Jon')
rob_stark = Stark.new('Rob')
bran_stark = Stark.new('Bran')
arya_stark = Stark.new('Arya')

summer_wolf.protects(sansa_stark)
summer_wolf.protects(john_stark)
summer_wolf.protects(jon_stark)
lady_wolf.protects(rob_stark)
lady_wolf.protects(bran_stark)
lady_wolf.protects(arya_stark)
Expand Down Expand Up @@ -129,7 +129,7 @@
summer_wolf.leaves(arya_stark)

expect(summer_wolf.starks_to_protect).to be_empty
expect(lady_wolf.starks_to_protect.first.name).to be('Sansa')
expect(lady_wolf.starks_to_protect.first.name).to eq('Sansa')
expect(arya_stark.safe?).to be false
end

Expand Down
2 changes: 1 addition & 1 deletion mythical-creatures/spec/ogre_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

6.times { ogre.encounter(human) }

expect(ogre.encounter_counter).to eq(6)
expect(human.encounter_counter).to eq(6)
expect(ogre.swings).to eq(2)
expect(human.knocked_out?).to be true
end
Expand Down
2 changes: 1 addition & 1 deletion mythical-creatures/spec/werewolf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

it 'is by default human' do
werewolf = Werewolf.new('David', 'London')
expect(werewolf.human?).to be false
expect(werewolf.human?).to be true
end

it 'when starting as a human, changing makes it turn into a werewolf' do
Expand Down
4 changes: 2 additions & 2 deletions problem-solving/spec/mad_lib_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.describe MadLib do

it 'can create a new mad lib' do
madlib = Madlib.new
madlib = MadLib.new

madlib.noun("dog")
madlib.verb("walk")
Expand All @@ -16,7 +16,7 @@
end

it 'can create another mad lib' do
madlib = Madlib.new
madlib = MadLib.new

madlib.noun("capybara")
madlib.verb("pet")
Expand Down

0 comments on commit 82b46b1

Please sign in to comment.