Topic: rspec nil value is invalid

i want to write a small test in rspec that checks that i have a account id and if there is not it should not be valid

describe "when account_id not not present  is invalid" do

Re: rspec nil value is invalid

Just get the account_id value and check if it is not nil:

 account_id = ... some_way_to_find_it
 account_id.should_not be_nil

See more details on RSpec expectation :