Re: [rspec-users] Issues upgrading RSpec

2012-10-19 Thread Rodrigo Rosenfeld Rosas
Em 19-10-2012 09:18, Rodrigo Rosenfeld Rosas escreveu: Em 18-10-2012 21:15, David Chelimsky escreveu: On Thu, Oct 18, 2012 at 6:58 PM, Rodrigo Rosenfeld Rosas wrote: My specs work fine with this in my Gemfile.lock: grep rspec Gemfile.lock rspec (2.11.0) rspec-core (~> 2.1

Re: [rspec-users] Issues upgrading RSpec

2012-10-19 Thread Rodrigo Rosenfeld Rosas
Em 18-10-2012 21:15, David Chelimsky escreveu: On Thu, Oct 18, 2012 at 6:58 PM, Rodrigo Rosenfeld Rosas wrote: My specs work fine with this in my Gemfile.lock: grep rspec Gemfile.lock rspec (2.11.0) rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) rspec

[rspec-users] Issues upgrading RSpec

2012-10-18 Thread Rodrigo Rosenfeld Rosas
My specs work fine with this in my Gemfile.lock: grep rspec Gemfile.lock rspec (2.11.0) rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) rspec-mocks (~> 2.11.0) rspec-core (2.11.0) rspec-expectations (2.11.1) rspec-mocks (2.11.1) rspec-rails (2.11.0)

[rspec-users] oojs - modular object-oriented Client-side specs

2012-06-03 Thread Rodrigo Rosenfeld Rosas
I've just published an article on testing client-side code with my newly released oojs gem, mostly useful for integration tests. They're not full integration tests since all AJAX calls are stubbed with SinonJS. I thought that maybe some of you might be interested on it: http://rosenfeld.hero

Re: [rspec-users] How does Spork help in requests specs?

2012-05-17 Thread Rodrigo Rosenfeld Rosas
o true for testing matters. I just found that I should report this here for benefits of others that might consider this approach as well on PostgreSQL. Best, Rodrigo. Em 17-05-2012 21:09, Rodrigo Rosenfeld Rosas escreveu: Sorry about this, I'm further investigating the slowness issue, a

Re: [rspec-users] How does Spork help in requests specs?

2012-05-17 Thread Rodrigo Rosenfeld Rosas
Sorry about this, I'm further investigating the slowness issue, and I found the culprit: truncation of my PostgreSQL are very slow. I'll investigate how to make it faster. Maybe deletion could be faster than truncation on PG... Cheers, Rodrigo. Em 17-05-2012 21:04, Rodrigo Rosen

[rspec-users] How does Spork help in requests specs?

2012-05-17 Thread Rodrigo Rosenfeld Rosas
Even with Spork, my requests specs are very slow to start running (about 7 seconds). I suspect Rails is booting each time I run "rspec -X spec/requests". Is that true? If so, is there any way I could instruct the web server to keep alive after the specs run so that it would be faster on next r

Re: [rspec-users] how can I do an "or" within the context of a matcher?

2012-05-15 Thread Rodrigo Rosenfeld Rosas
You're looking for Custom Matchers: https://github.com/dchelimsky/rspec/wiki/Custom-Matchers Em 15-05-2012 03:47, Patrick J. Collins escreveu: Capybara has two methods: page.has_button? and page.has_link? ... I am wondering, how can I make a helper method that will be satisfied by one or t

Re: [rspec-users] New google groups (help, please)

2012-04-25 Thread Rodrigo Rosenfeld Rosas
I was just about to suggest you a few days ago to move away from rubyforge and towards Google Groups. Much better interface and I don't think it worths trying to keep a mirror. There is no need for that. Cheers, Rodrigo. Em 25-04-2012 06:41, David Chelimsky escreveu: Hi all. Google is in t

Re: [rspec-users] How to modify database inside a transaction in before(:all)?

2012-04-23 Thread Rodrigo Rosenfeld Rosas
Em 23-04-2012 20:04, David Chelimsky escreveu: On Mon, Apr 23, 2012 at 5:39 PM, Rodrigo Rosenfeld Rosas wrote: I have a set of examples that should run with a specific set of records in the database. Since setting those records is an expensive operation I'd like to perform it just onc

[rspec-users] How to modify database inside a transaction in before(:all)?

2012-04-23 Thread Rodrigo Rosenfeld Rosas
I have a set of examples that should run with a specific set of records in the database. Since setting those records is an expensive operation I'd like to perform it just once per context. For example: context 'sample tree' do before(:all) { create_tree_records } example ... end Th

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-19 Thread Rodrigo Rosenfeld Rosas
m much cleaner with Sequel than with AR. Cheers, Rodrigo. Em 16-04-2012 14:17, Rodrigo Rosenfeld Rosas escreveu: Em 16-04-2012 09:27, Rodrigo Rosenfeld Rosas escreveu: Thank you David and Matt for your comments. Indeed I had considered using FakeWeb but I thought that maybe there could be a

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-16 Thread Rodrigo Rosenfeld Rosas
Em 16-04-2012 09:27, Rodrigo Rosenfeld Rosas escreveu: Thank you David and Matt for your comments. Indeed I had considered using FakeWeb but I thought that maybe there could be an easier way just to mock 'open' directly since I guess it would be faster to run. With regards t

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-16 Thread Rodrigo Rosenfeld Rosas
Thank you David and Matt for your comments. Indeed I had considered using FakeWeb but I thought that maybe there could be an easier way just to mock 'open' directly since I guess it would be faster to run. With regards to the work around to overcome the issue with mocking AR so that I could

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-15 Thread Rodrigo Rosenfeld Rosas
Em 14-04-2012 10:11, David Chelimsky escreveu: On Friday, April 13, 2012 at 2:09 PM, Rodrigo Rosenfeld Rosas wrote: Hello old friends, I'm getting back to Rails and Ruby programming full time again (Yay!) I've stopped doing Rails programming to work with Grails in 2009 after 2 yea

[rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-13 Thread Rodrigo Rosenfeld Rosas
Hello old friends, I'm getting back to Rails and Ruby programming full time again (Yay!) I've stopped doing Rails programming to work with Grails in 2009 after 2 years working with Rails due to a better job offer. Since then I've changed my job once more, but still on Grails, but I found a c

[rspec-users] Can't access https://www.relishapp.com/rspec from Chrome

2012-04-07 Thread Rodrigo Rosenfeld Rosas
It seems it has an invalid certificate. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 16:31, Rodrigo Rosenfeld Rosas escreveu: Em 09-12-2011 15:43, David Chelimsky escreveu: On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas wrote: Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 15:43, David Chelimsky escreveu: On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas wrote: Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (

[rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (using --drb and spork): Finished in 731.67 seconds 10 examples, 0 failures But it actually run "time rake" in less than 2s. "time rspec" runs in about 0.2s. The finished time

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (using --drb and spork): Finished in 731.67 seconds 10 examples, 0 failures But it actually run "time rake&quo

Re: [rspec-users] Mock/stub ActiveMerchant? (or other cascading/multiple inheritance situation)

2011-04-29 Thread Rodrigo Rosenfeld Rosas
Em 29-04-2011 13:15, David Kahn escreveu: On Thu, Apr 28, 2011 at 8:03 PM, Pat Maddox > wrote: On Apr 28, 2011, at 4:37 PM, David Kahn wrote: > I am a bit new to mocking. I am trying to stub the ActiveMerchant::Billing::PaypalGateway#authorize method but

Re: [rspec-users] Parallelize RSpec

2011-04-29 Thread Rodrigo Rosenfeld Rosas
Em 29-04-2011 00:19, Adam Esterline escreveu: Both https://github.com/test-load-balancer and https://github.com/grosser/parallel_tests seem more complicated than needed.They both require other moving parts (database; other server).It seems now with ruby 1.9 and jruby a simpler solution (m

Re: [rspec-users] Parallelize RSpec

2011-04-28 Thread Rodrigo Rosenfeld Rosas
Have you already tried Parallel Tests? https://github.com/grosser/parallel_tests It helped a lot for me... Hope it helps, Rodrigo. Em 28-04-2011 16:54, Adam Esterline escreveu: I am looking for some advice on the best way to parallelize a large set of browser-based regression tests written i

Re: [rspec-users] before(:each) <- need some clarification

2011-04-27 Thread Rodrigo Rosenfeld Rosas
Wow! I guess this thread beated the record for simultaneous answers! :D Best regards! Rodrigo. Em 27-04-2011 16:55, Sergio Ruiz escreveu: i am setting up a few objects that are interrelated for use in an rspec test.. something like: describe Dimension do before(:each) do text = "string he

Re: [rspec-users] Mocking/Stubbing behavior question

2011-04-26 Thread Rodrigo Rosenfeld Rosas
Ok, now I understand what is your issue. class Fooend class Bar  def self.my_foo    @my_foo ||= Foo.new  end  def self.perform     my_foo.do_something  endend describe Foo do   before(:each) do    @stupid_mock = double('wtf')    Foo.stub(:new => @stupid_mock)  endit "passes here" do     @stupi

Re: [rspec-users] Mocking/Stubbing behavior question

2011-04-25 Thread Rodrigo Rosenfeld Rosas
Em 25-04-2011 14:58, Matthew Van Horn escreveu: On Apr 25, 2011, at 1:36 PM, Matthew Van Horn wrote: I've run into some strange behavior in porting my specs from rspec to rspec2. I am wondering if I am doing something wrong, or if I've misunderstood something, or if this is some kind of bug.

Re: [rspec-users] stubbing Model.find(id) issues

2011-04-25 Thread Rodrigo Rosenfeld Rosas
Em 24-04-2011 23:39, David Chelimsky escreveu: On Apr 24, 2011, at 6:25 PM, Rodrigo Rosenfeld Rosas wrote: Em 24-04-2011 12:09, David Chelimsky escreveu: On Apr 24, 2011, at 9:29 AM, Rodrigo Rosenfeld Rosas wrote: I've started a fresh rails app with Employee belongs_to Company. Here i

Re: [rspec-users] Slow test suite with Ruby 1.9.2 and Rspec 2.5

2011-04-24 Thread Rodrigo Rosenfeld Rosas
Em 24-04-2011 19:22, Alisson Sales escreveu: On Sun, Apr 24, 2011 at 6:23 PM, Sidu Ponnappa wrote: Are you perhaps seeing http://is.gd/6aINHC ? We've moved several Rails projects to 1.9.2 over the last few months and we've found our builds running slower on all (we use RSpec too). I'm not sure

Re: [rspec-users] stubbing Model.find(id) issues

2011-04-24 Thread Rodrigo Rosenfeld Rosas
Em 24-04-2011 12:09, David Chelimsky escreveu: On Apr 24, 2011, at 9:29 AM, Rodrigo Rosenfeld Rosas wrote: I've started a fresh rails app with Employee belongs_to Company. Here is the spec: describe Employee do example "stub should work with find(id)" do company = moc

[rspec-users] stubbing Model.find(id) issues

2011-04-24 Thread Rodrigo Rosenfeld Rosas
I've started a fresh rails app with Employee belongs_to Company. Here is the spec: describe Employee do example "stub should work with find(id)" do company = mock_model Company Company.stub!(:find).with(company.id).and_return company employee = Employee.new company_id: company.id

[rspec-users] stubbing find in ActiveRecord considering only the first argument

2011-04-20 Thread Rodrigo Rosenfeld Rosas
For some unknown (yet) reason, an association is trying to call Model.find(1, conditions: nil) instead of Model.find(1), which doesn't allow me to write "Model.stub!(:find).with(1).and_returns(@model)". Instead of trying to figure out (I will anyway) why it is been calling this way, what I rea

Re: [rspec-users] stubbing find in ActiveRecord considering only the first argument

2011-04-20 Thread Rodrigo Rosenfeld Rosas
I've just found mock_model: http://rubydoc.info/gems/rspec-rails/2.4.0/frames Seems like it solves my problem ;) Em 20-04-2011 22:34, Rodrigo Rosenfeld Rosas escreveu: For some unknown (yet) reason, an association is trying to call Model.find(1, conditions: nil) instead of Model.f

Re: [rspec-users] rspec execution speed footprint

2011-04-16 Thread Rodrigo Rosenfeld Rosas
Em 16-04-2011 12:57, David Chelimsky escreveu: On Apr 16, 2011, at 9:05 AM, Rodrigo Rosenfeld Rosas wrote: Hi, I would like to figure out if it is possible for me to run my specs faster than it currently is. Before start optimizing my specs for speed, I tried to figure out what was the

[rspec-users] rspec execution speed footprint

2011-04-16 Thread Rodrigo Rosenfeld Rosas
Hi, I would like to figure out if it is possible for me to run my specs faster than it currently is. Before start optimizing my specs for speed, I tried to figure out what was the speed footprint of Rspec boot process itself for starting executing my specs. So I took my simplest spec with a si

Re: [rspec-users] Rails 3 route path helpers no longer accessible from /specs/requests/

2011-04-15 Thread Rodrigo Rosenfeld Rosas
Em 14-04-2011 02:51, JDeville escreveu: I just did a bundle update, and my integration specs stopped working. I was on Rails 3.0.5, and am now on 3.0.6. Any suggestions on how to get access to those routes back? In case the subject wasn't clear, this is what is no longer working: get sessio

Re: [rspec-users] given-when-then-and syntax support in Rspec

2011-03-28 Thread Rodrigo Rosenfeld Rosas
Em 28-03-2011 01:10, David Chelimsky escreveu: On Mar 27, 2011, at 5:12 PM, Rodrigo Rosenfeld Rosas wrote: Em 27-03-2011 06:55, David Chelimsky escreveu: On Mar 26, 2011, at 9:43 PM, Rodrigo Rosenfeld Rosas wrote: Hi David and fellows, I know this subject has already been discussed here

Re: [rspec-users] given-when-then-and syntax support in Rspec

2011-03-27 Thread Rodrigo Rosenfeld Rosas
Em 27-03-2011 06:55, David Chelimsky escreveu: On Mar 26, 2011, at 9:43 PM, Rodrigo Rosenfeld Rosas wrote: Hi David and fellows, I know this subject has already been discussed here and there are already some attempts to support the given-when-then-and syntax in Rspec, like the links below

Re: [rspec-users] given-when-then-and syntax support in Rspec

2011-03-27 Thread Rodrigo Rosenfeld Rosas
Em 27-03-2011 10:32, Matt Wynne escreveu: On 27 Mar 2011, at 03:43, Rodrigo Rosenfeld Rosas wrote: Hi David and fellows, I know this subject has already been discussed here and there are already some attempts to support the given-when-then-and syntax in Rspec, like the links below: https

[rspec-users] given-when-then-and syntax support in Rspec

2011-03-26 Thread Rodrigo Rosenfeld Rosas
Hi David and fellows, I know this subject has already been discussed here and there are already some attempts to support the given-when-then-and syntax in Rspec, like the links below: https://gist.github.com/206969 https://github.com/jimweirich/rspec-given First, I don't understand the reaso

Re: [rspec-users] rspec-rails 2 webrat dependency

2010-06-21 Thread Rodrigo Rosenfeld Rosas
Em 19-06-2010 16:12, Rick DeNatale escreveu: On Sat, Jun 19, 2010 at 1:07 PM, Rodrigo Rosenfeld Rosas wrote: Is there any reason for that? If so, couldn't Rspec use Capybara instead of Webrat if it is not present? Is it possible to depend on Webrat OR Capybara in the gem

[rspec-users] rspec-rails 2 webrat dependency

2010-06-19 Thread Rodrigo Rosenfeld Rosas
Hi, I've finally make all my tests pass in Rails 3 with Capybara. After removing webrat's dependency in favor of the new Capybara one, I expected that bundle install would remove Webrat dependencie. After a few minutes searching for bundler bugs related to removing dependencies I've tried to

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-11 Thread Rodrigo Rosenfeld Rosas
s to be plans to merge them... Does anyone here use Capybara with Rspec2 and Rails 3 without Cucumber to write integration tests successfully? Thanks, Rodrigo. Em 11-06-2010 14:44, David Chelimsky escreveu: Sent from my iPhone On Jun 11, 2010, at 1:30 PM, Rodrigo Rosenfeld Rosas wrot

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-11 Thread Rodrigo Rosenfeld Rosas
30 PM, Rodrigo Rosenfeld Rosas wrote: Now I'm getting: no such file to load -- action_controller/integration Am I missing something? Thanks, Rodrigo. P.S.: Sorry if this was sent twice... Em 11-06-2010 01:10, David Chelimsky escreveu: Change the directory name to requests (a la merb) Se

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-11 Thread Rodrigo Rosenfeld Rosas
Now I'm getting: no such file to load -- action_controller/integration Am I missing something? Thanks, Rodrigo. Em 11-06-2010 01:10, David Chelimsky escreveu: Change the directory name to requests (a la merb) Sent from my iPhone On Jun 10, 2010, at 10:35 PM, Rodrigo Rosenfeld

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-11 Thread Rodrigo Rosenfeld Rosas
Also, changing the directory name didn't affect the custom IntegrationHelper issue... Rodrigo. Em 11-06-2010 01:10, David Chelimsky escreveu: Change the directory name to requests (a la merb) Sent from my iPhone On Jun 10, 2010, at 10:35 PM, Rodrigo Rosenfeld Rosas wrote: Hi

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-11 Thread Rodrigo Rosenfeld Rosas
0, at 10:35 PM, Rodrigo Rosenfeld Rosas wrote: Hi guys, I'm trying to port an application to Rails 3 but can't get my integration tests to run. I can't call the Webrat's method (yields 'undefined method `visit`', for instance). I don't use Cucumber. Is there

[rspec-users] Rspec 2, Rails 3 and Webrat

2010-06-10 Thread Rodrigo Rosenfeld Rosas
Hi guys, I'm trying to port an application to Rails 3 but can't get my integration tests to run. I can't call the Webrat's method (yields 'undefined method `visit`', for instance). I don't use Cucumber. Is there any instructions about how to configure Rspec 2 with Webrat on Rails 3? I al

[rspec-users] RSpec tasks, JRuby and rvm

2010-05-06 Thread Rodrigo Rosenfeld Rosas
I've been playing with rvm these days and I had a bad surprise today. $ rvm install jruby $ rvm jruby $ rake test failed... Of course you didn't understand. I didn't explain yet... I've written a Rakefile following RSpec homepage instructions and adding some options to ruby (namely "--ng", fo

Re: [rspec-users] no should raise_exception

2009-12-28 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: On Mon, Dec 28, 2009 at 2:08 PM, rogerdpack > wrote: > What I really want to say is "should raise(Blah)" but Ruby already defines > raise as a keyword :) > > I'd be open to aliasing raise_error with raise_exception,

Re: [rspec-users] Custom Matcher and Webrat methods

2009-12-10 Thread Rodrigo Rosenfeld Rosas
Matt Wynne escreveu: On 10 Dec 2009, at 00:53, Rodrigo Rosenfeld Rosas wrote: Matt Wynne escreveu: ... One problem less :) Next one to be solved: making Selenium work faster with Webrat :) You might want to look at replacing webrat with Capybara then. I've not tried it myself,

Re: [rspec-users] Custom Matcher and Webrat methods

2009-12-09 Thread Rodrigo Rosenfeld Rosas
Matt Wynne escreveu: On 8 Dec 2009, at 22:04, Rodrigo Rosenfeld Rosas wrote: I would like to be able to write a custom matcher so that I could call this test, for instance: @user.should be_allowed_to_visit(url) @non_welcome.should_not be_allowed_to_visit(url) The matcher would call Webrat

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
Rick DeNatale escreveu: On Wed, Dec 9, 2009 at 1:15 PM, David Chelimsky wrote: On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox wrote: [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowed_to_visit(url) I prefer the first so as not

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
all_be_allowed_to_visit(url) On Dec 9, 2009, at 5:27 AM, David Chelimsky wrote: On Wed, Dec 9, 2009 at 5:41 AM, Rodrigo Rosenfeld Rosas wrote: I was thinking that it would be great to add 2 additional methods to Object: should_all and should_none. The idea is that we would be able to

[rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
I was thinking that it would be great to add 2 additional methods to Object: should_all and should_none. The idea is that we would be able to write tests like: [...@admin, @allowed_user].should_all be_allowed_to_visit(url) [...@unprivileged, @non_welcome].should_none be_allowed_to_visit(url)

[rspec-users] Custom Matcher and Webrat methods

2009-12-08 Thread Rodrigo Rosenfeld Rosas
I would like to be able to write a custom matcher so that I could call this test, for instance: @user.should be_allowed_to_visit(url) @non_welcome.should_not be_allowed_to_visit(url) The matcher would call Webrat methods such as 'visit'. The problem is that it would try to call 'visit' from Us

Re: [rspec-users] "lambda Should Change" Behavior Failing When Checking Time

2009-11-08 Thread Rodrigo Rosenfeld Rosas
Carlos Rodriguez escreveu: Thanks to everyone that responded to my question. Here is what I ended up doing to make the spec pass: time_now = Time.now Time.stub!(:now).and_return(time_now) lambda { @post.publish! }.should change(@post, :published_at).from(nil).to(time_now) I have thought on t

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: ... As for internals, my goal for the Cucumber features is to provide an executable set of documentation for end users to understand how to use RSpec. Not so much to expose internals, which I think is better addressed in the RSpec code examples themselves. Make sense

Re: [rspec-users] "lambda Should Change" Behavior Failing When Checking Time

2009-11-08 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: On Sat, Nov 7, 2009 at 6:18 PM, Carlos Rodriguez > wrote: Hello, I'm having a problem with RSpec when using the "lambda should change behavior". This is happening in a Rails 2.3.4 app and I'm running the following in my t

Re: [rspec-users] describe "RSpec's documentation" do

2009-11-07 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: Hi all, describe "RSpec's documentation" do it "should be helpful" it "should be maintainable" end I've been wanting to improve RSpec's documentation situation for a long time, but my writing energies have been consumed by rspec itself and The RSpec Book for a lo

Re: [rspec-users] [RSpec] Testing "validates_uniquesness of"

2009-11-04 Thread Rodrigo Rosenfeld Rosas
Em 02-11-2009 04:48, Joseph.DelCioppio escreveu: Guys, Getting used to doing BDD, and in my current project I'm trying to spec out my model, and in particular the fact that my model must validate that one of its fields are unique; in this case, the customer's email address. Simple enough model,

[rspec-users] webrat, Rails and controller sessions

2009-10-30 Thread Rodrigo Rosenfeld Rosas
When I ran 'rake spec', it generated a spec_helper.rb with the following line: require 'webrat/integrations/rspec-rails' It seems that this file changed to webrat/rspec-rails on last webrat gem. But changing to "require 'webrat/rspec-rails'" doesn't seem to work. What solved for me was follow

Re: [rspec-users] have_same_elements_of proposal

2009-10-28 Thread Rodrigo Rosenfeld Rosas
Excelent, Pat. Is this operator documented somewhere? Thank you, Rodrigo. Em 29-10-2009 00:16, Pat Maddox escreveu: Already in. [1,2].should =~ [2,1] Pat On Wed, Oct 28, 2009 at 4:44 PM, Rodrigo Rosenfeld Rosas wrote: How about having this matcher along the default available

[rspec-users] have_same_elements_of proposal

2009-10-28 Thread Rodrigo Rosenfeld Rosas
How about having this matcher along the default available matchers? require 'set' Spec::Matchers.define :have_same_elements_of do |expected| match do |actual| expected.to_set == actual.to_set end end Example: [1,2].should have_same_elements_of([2,1]) Best Regards, Rodrigo. __

Re: [rspec-users] Testing url_for

2009-10-28 Thread Rodrigo Rosenfeld Rosas
Em 28-10-2009 00:21, David Chelimsky escreveu: ... Actually, I've taken a look at Factory Girl, but prefered Machinist, which is awesome. I'll take a look at Fixjour and Fixture Replacement. Do they have a blueprint-like feature? I have no problem in creating methods in ActiveRecord::Base.

Re: [rspec-users] Testing url_for

2009-10-27 Thread Rodrigo Rosenfeld Rosas
Em 27-10-2009 15:17, David Chelimsky escreveu: On Oct 27, 2009, at 8:21 AM, Rodrigo Rosenfeld Rosas wrote: Hi David, I'm giving a try to RSpec after we meet each other on Rails Summit Latin America and I must admit I'm enjoying using rspec/machinist/faker. Since I have not w

[rspec-users] Testing url_for

2009-10-27 Thread Rodrigo Rosenfeld Rosas
Hi David, I'm giving a try to RSpec after we meet each other on Rails Summit Latin America and I must admit I'm enjoying using rspec/machinist/faker. Since I have not written any controllers yet, I hadn't taken a chance to try webrat. But there is a situation that I would like some feedback