Complete the code to start an RSpec test group.
RSpec.[1] "Calculator" do # tests go here end
The describe block defines a test group in RSpec.
Complete the code to define an example (test case) inside a describe block.
RSpec.describe "Calculator" do [1] "adds two numbers" do expect(1 + 1).to eq(2) end end
The it block defines an example or test case in RSpec.
Fix the error in the RSpec example block keyword.
RSpec.describe "Calculator" do [1] "subtracts numbers" do expect(5 - 3).to eq(2) end end
The correct keyword for an example block is it. Using 'describe' or 'context' here is incorrect.
Fill both blanks to create a nested context and example in RSpec.
RSpec.describe "Calculator" do [1] "when dividing" do [2] "returns the quotient" do expect(10 / 2).to eq(5) end end end
The outer block uses context to describe a situation, and the inner block uses it for the example.
Fill all three blanks to write a full RSpec test with describe, context, and it blocks.
RSpec.[1] "Calculator" do [2] "when multiplying" do [3] "returns the product" do expect(3 * 4).to eq(12) end end end
describe and context usage.example which is not a valid keyword.The top-level group uses describe, the condition uses context, and the test case uses it.
