ruby on rails - Rspec expect keeps throwing a TypeError: nil is not a symbol -


so have test in app:

expect{   post :create, :name=> 'abc' }.to change(event.count).from(0).to(1) 

and keeps throwing error:

typeerror: nil not symbol 

would know why?

found out issue. should using {} instead of (). should instead:

expect{   post :create, :name=> 'abc' }.to change{event.count}.from(0).to(1) 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -