Re: [rspec-users] Simular to Include

2013-02-27 Thread reza . primardiansyah
It appears to duplicate implementation. Perhaps this can do: array2.each do |s2| array1.should be_any do |s1| s1.include s2 end end Or use zip instead Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...! -Original Message- From: Ervin Weber Sender:

Re: [rspec-users] Simular to Include

2013-02-27 Thread Ervin Weber
(Array1 - array2).should be_blank maybe? On 28 Feb 2013 07:42, "Mattias A." wrote: > Hi, > > I have array1 that contains several web address. Array2 contains the > expected endings of array1 values. How can I control that arrays2 values > is in array1? > > I have tried array1.should include array

Re: [rspec-users] Simular to Include

2013-02-27 Thread Ervin Weber
Misunderstood examples. Array1.collect{|s| s.split ('/').last}.should == array2 seems closer to your intent. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Simular to Include

2013-02-27 Thread Mattias A.
Hi, I have array1 that contains several web address. Array2 contains the expected endings of array1 values. How can I control that arrays2 values is in array1? I have tried array1.should include array2, but it requires that array1 and array2 is identical. array1 = ["https:///page.html, http

Re: [rspec-users] Testing Controllers in Rspec

2013-02-27 Thread guirec c.
Personaly, I only create only the scenario when everything is ok (the happy path). For controllers, models, etc... I test everything. Acceptances specs are slow. Test everything in acceptances specs will make your test suite very very very slow and I think it's useless. It's only my opinion. So

Re: [rspec-users] Testing Controllers in Rspec

2013-02-27 Thread ruby rails
guirec c. wrote in post #1099350: > I think your are confused with acceptance specs and controllers spec. In > a controller spec you must to test only your controller in total > isolation. You can use stubs and mocks to do it. In the acceptance spec > you must to test all the behaviour at a very hi

Re: [rspec-users] Testing Controllers in Rspec

2013-02-27 Thread guirec c.
I think your are confused with acceptance specs and controllers spec. In a controller spec you must to test only your controller in total isolation. You can use stubs and mocks to do it. In the acceptance spec you must to test all the behaviour at a very high level. I think to create a record i

[rspec-users] Testing Controllers in Rspec

2013-02-27 Thread ruby rails
I am building an Rails application where the forgot password feature is implemented. I need to write the test cases for it using RSpec. I am very new to RSPEC and got the basic idea of how rspec works from the tutorial and screencasts. But I am not sure how it can be tested for controllers. In my c