On 14 Jul 2014, at 21:56, [email protected] wrote:

>   Today's topic summary
> Group: http://groups.google.com/group/rspec/topics
> 
> How to initialize a custom matcher in rspec 3 [1 Update]
> expect(assigns(:clients)).to match_array(clients) fails or passes, very 
> brittle behaviour [2 Updates]
>  How to initialize a custom matcher in rspec 3
> Kris Leech <[email protected]> Jul 11 04:13PM -0700  
> 
> I'm writing a custom matcher to allow testing of the exit status of code.
>  
> I've written the matcher as an object using the bits of information I could 
> find.
>  
> I'm using `config.include(Rspec::ExitMatchers)` to include a module which 
> has one method which creates an instance of my matcher, however this method 
> receives the expected value, not the block passed to `expect`, so how do I 
> create an instance of my matcher since the initializer needs the block 
> (actual), not the expected value which should be passed to `matches?`...
>  
> https://github.com/krisleech/rspec-exit_matchers/blob/master/lib/rspec/exit_matchers.rb#L38
>  
> https://github.com/krisleech/rspec-exit_matchers/blob/master/spec/rspec/exit_matchers_spec.rb#L3
>  
> Any helps/pointers would be great. Thanks, Kris.
>  
>  expect(assigns(:clients)).to match_array(clients) fails or passes, very 
> brittle behaviour
> Myron Marston <[email protected]> Jul 14 11:05AM -0700  
> 
> On Saturday, July 12, 2014 1:15:42 PM UTC-7, Javix wrote:
> > DatabaseCleaner truncation feature.
> > And my features/ClientsControllerPage
>  
> > WTF, it fails again...
>  
> If you can put together a reproducible example, open an issue and we'll 
> take a look. It's hard (nearly impossible) for us to debug remotely based 
> on the limited information you've given us.
>  
> Myron
>  
> Serguei Cambour <[email protected]> Jul 14 08:22PM +0200  
> 
> 
> > WTF, it fails again...
>  
> > If you can put together a reproducible example, open an issue and we'll 
> > take a look. It's hard (nearly impossible) for us to debug remotely based 
> > on the limited information you've given us.
>  
> > Myron
>  
> Tank you Myron.
> Just for history, I was going to take a try with RSpec features (never used 
> them before), instead of Cucumber's ones, that's why I was a little bit stuck 
> with that. So I just deleted RSpec 'features' folder with all the specs 
> inside and came back to Cucumber to be able to continue.
> If I manage to check out a branch from the point where I had features 
> available on my project, I'll create a gist or even a branch and come back 
> here with more details.
> Thank you again for your fed back.
@Myron: I pushed to remote a branch that has RSpec features implemented. When 
running all the specs, tests failed (2). When running the same but separately, 
they pass.

You can clone the brannch from 
https://github.com/Javix/jlc-invest/tree/rspec_features_back

Thank you.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/9BFBCB17-F7DA-4B9E-A4A9-39AE7EADFBFB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to