[rspec-users] RSpec 2 Ruby 1.8.6 support (was Evaluating shared example customisation block before shared block)

2010-08-02 Thread Ashley Moran
On Aug 01, 2010, at 11:52 pm, David Chelimsky wrote: re: 1.8.6, we've got a home-grown implementation of instance_exec that runs in 1.8.6 (although I just discovered that it's broken - fix coming shortly). I could a) add such a thing for module_exec as well, though I haven't quite

Re: [rspec-users] RSpec 2 Ruby 1.8.6 support (was Evaluating shared example customisation block before shared block)

2010-08-02 Thread David Chelimsky
On Aug 2, 2010, at 4:49 AM, Ashley Moran wrote: On Aug 01, 2010, at 11:52 pm, David Chelimsky wrote: re: 1.8.6, we've got a home-grown implementation of instance_exec that runs in 1.8.6 (although I just discovered that it's broken - fix coming shortly). I could a) add such a thing

[rspec-users] migration question

2010-08-02 Thread rogerdpack
Got this: no such file to load -- spec/rake/spectask anybody know off hand what the equivalent is for rspec2? -r ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] RSpec 2 Ruby 1.8.6 support (was Evaluating shared example customisation block before shared block)

2010-08-02 Thread Ashley Moran
On 2 Aug 2010, at 1:08 PM, David Chelimsky wrote: But what about people who are, for what ever reasons, stuck with Ruby 1.8.6 and want to upgrade? Also, there are a few rspec-2 + rails-2 efforts in the works, and there will be a solution for this sometime this fall. We need to support

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-02 Thread David Chelimsky
On Aug 1, 2010, at 10:08 PM, Myron Marston wrote: OK, I tried to implement #module_exec on ruby 1.8.6, and here's what I came up with: http://github.com/myronmarston/rspec-core/commit/364f20ebd5b7d9612227cb6e86a6e8c8c2e9931e It works (at least in the sense that it allows the specs and

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-02 Thread Ashley Moran
On 2 Aug 2010, at 2:04 AM, Myron Marston wrote: I actually find the use of this to be a bit confusing: [:foo, :bar].each do |arg| it_should_behave_like Something, arg do |a| # The value of the param is already bound to arg and now it's bound to a, too. end end I suppose it may

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-02 Thread Ashley Moran
On 2 Aug 2010, at 4:08 AM, Myron Marston wrote: Backports (a library that implements features of later versions of ruby in 1.8.6) implements it in a similar fashion: http://github.com/marcandre/backports/blob/v1.18.1/lib/backports/1.8.7/module.rb Conceivably, RSpec 2 could depend on

Re: [rspec-users] migration question

2010-08-02 Thread David Chelimsky
On Aug 2, 2010, at 8:09 AM, David Chelimsky wrote: On Aug 2, 2010, at 7:46 AM, rogerdpack wrote: Got this: no such file to load -- spec/rake/spectask anybody know off hand what the equivalent is for rspec2? rspec/core/rake_task I'll add that to Upgrade.markdown

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-02 Thread Ashley Moran
On 1 Aug 2010, at 11:52 PM, David Chelimsky wrote: re: order of evaluation of blocks, I think I'm inclined to go one way one minute, and another the next. Somebody convince me of one or the other. One thing that may help clear this up is: can anyone offer a concrete example of where

Re: [rspec-users] Newbie : How to spec params hash amendment

2010-08-02 Thread Elliot Winkler
On 7/30/10 5:53 AM, Martin Hawkins wrote: I have no idea how to approach 'rspec'ing the creation of the params[:user][:password] and :password_confirmation or the random_password method and would very much appreciate it if somebody could spare the time to suggest what I should be doing. You

Re: [rspec-users] migration question

2010-08-02 Thread David Chelimsky
On Aug 2, 2010, at 7:46 AM, rogerdpack wrote: Got this: no such file to load -- spec/rake/spectask anybody know off hand what the equivalent is for rspec2? rspec/core/rake_task I'll add that to Upgrade.markdown -r ___ rspec-users mailing

[rspec-users] Specifying which spec types helper modules get included into in the RSpec.configure block

2010-08-02 Thread S Bennett
Hi folks, Using Rails 3.0.0.rc RSpec 2.0.0.beta.19 I'm trying to specify what type of specs helper modules get included into such as below: config.include Devise::TestHelpers, :type = :controller When I run the controller specs I get undefined method 'sign_in' which tells me that the

[rspec-users] Controller spec, integrate views, mocking helper method

2010-08-02 Thread LesNightingill
I need to use integrate views to test some particular features. In ApplicationHelper I have: module ApplicationHelper def current_user_permitted? # some logic that returns true/false end end I'm testing MyController using Rspec/flexmock... describe MyController do

Re: [rspec-users] migration question

2010-08-02 Thread Myron Marston
This may be useful for folks migrating... I recently updated one of my projects to RSpec 2. Here's the commit with all the changes: http://github.com/myronmarston/vcr/commit/f05cc59abc16b711e345bab2994ad2ebfdce7170 Summary: - Updated rakefile so it defines new spec tasks - Migrated