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
????????
endYou are not logged in. Please login or register.
Rails Forum - Ruby on Rails Help and Discussion Forum » Test/Behavior Driven Development » 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
????????
endJust get the account_id value and check if it is not nil:
account_id = ... some_way_to_find_it
account_id.should_not be_nilSee more details on RSpec expectation : http://rubydoc.info/gems/rspec-expectations/frames
Hosting provided by aTech Media