Rspec: expect vs expect with block - what's the difference?
问题 Just learning rspec syntax and I noticed that this code works: context "given a bad list of players" do let(:bad_players) { {} } it "fails to create given a bad player list" do expect{ Team.new("Random", bad_players) }.to raise_error end end But this code doesn't: context "given a bad list of players" do let(:bad_players) { {} } it "fails to create given a bad player list" do expect( Team.new("Random", bad_players) ).to raise_error end end It gives me this error: Team given a bad list of