I am trying to pass Rspec tests in ruby and am having issues with this one: Rspec:
it "should valiate secret contains four accepted uppercase characters" do
@game.secret = "XXXX"
secret = "RRRR"
valid1 = @game.checksecret(secret)
valid2 = check_valid(secret)
valid1.should == valid2 && @game.secret.should == secret && valid1.should == 0
end
Here is my code (that does not work)
def secret(secret)
@secret = "XXXX"
secret = "RRRR"
valid1 = @checksecret
valid2 = check_secret
valid1 = valid2
valid1 = 0
end
I am new to programming so any help would be appreciated, Thanks
Aucun commentaire:
Enregistrer un commentaire