ruby on rails - Rspec check return value -
I am learning the test in the rail rspec. I have this part of the test:
The subject (: service) {described_clash.New ()) should be expecting STH 'when' STH 'should be done (ServiceCol (@Palus)). AEC (0) End End
The service call call return number but I get something like this:
Failure:
1) Module :: STH should be a failure / error when registering: Hopefully (service.call (@love)) 2 eq (2) node methodAir: For unchanged method 2: Fixation # ./spec/module/registration_spec.rb:22:in Block (3 level) & lt; Module: Module & gt; '1 example ended in 2.48 seconds, 1 failure
How can I correct that method by using the "number" variable?
You hope
and (
:
to remove the space between) expectations (service.call (@params)). AEC (0) # ^^
Otherwise, Ruby evaluates different expressions:
(service call (@bottom)) .to ( 2) .to # = & gt; For undefined method 2: Fixation
Comments
Post a Comment