Re: [rspec-users] running rspec causes errror => no such file to load -- rspec/rails

2011-10-13 Thread Justin Ko
On Oct 13, 2011, at 9:43 PM, slavix wrote: > strange install related problems in my rails 3.1 app > gemfile > group :test, :development do > .. > gem "rspec" > gem "rspec-rails" > gem 'rspec-rails-ext' > gem 'rspec-rails-matchers' > .. > end > >>> bundle show rspec-rails > /home/slava/.rvm/

Re: [rspec-users] Helper methods can't be called within before hooks. Help, please.

2011-10-13 Thread Justin Ko
On Oct 13, 2011, at 8:59 PM, Gordon wrote: > > > Hi, there, > > > I believe I have some problem with scoping. > > I have a controller spec file which tests a brands resource. > At the start of the file, I test the resource's access for different > users in a context block > a) not signed in

Re: [rspec-users] Scope problems for before hooks using helper methods?

2011-10-13 Thread Justin Ko
On Oct 13, 2011, at 7:35 PM, Gordon wrote: > > > Hi, there, > > > I believe I have some problem with scoping. > > I have a controller spec file which tests a brands resource. > At the start of the file, I test the resource's access for different > users in a context block > a) not signed in

[rspec-users] Helper methods can't be called within before hooks. Help, please.

2011-10-13 Thread Gordon
Hi, there, I believe I have some problem with scoping. I have a controller spec file which tests a brands resource. At the start of the file, I test the resource's access for different users in a context block a) not signed in b) non-admin user signed in- I call my own helper method, login_

[rspec-users] How do we include support helpers in request specs?

2011-10-13 Thread Gordon
Hi, all :) I have some working support helpers defined in spec/support/ controller_macros.rb. I'm running "rake spec" before a 'git commit' and observed that the spec request for my 'brands' controller, spec/requests/brands_spec.rb fails because a support helper method I defined in spec/support/

[rspec-users] running rspec causes errror => no such file to load -- rspec/rails

2011-10-13 Thread slavix
strange install related problems in my rails 3.1 app gemfile group :test, :development do .. gem "rspec" gem "rspec-rails" gem 'rspec-rails-ext' gem 'rspec-rails-matchers' .. end >>bundle show rspec-rails /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-1.3.2 >>rails generate rspec

Re: [rspec-users] assert_select - to do negative tests - need help with syntax please :)

2011-10-13 Thread Gordon
> > I don't know if you can. Maybe somebody on the Rails list knows. If it can't, it means that people can't use assert_select to expect NOT to find a given element with extra attributes (such as :name) being defined. If that's the case, i think assert_select was either poorly written OR not com

[rspec-users] Scope problems for before hooks using helper methods?

2011-10-13 Thread Gordon
Hi, there, I believe I have some problem with scoping. I have a controller spec file which tests a brands resource. At the start of the file, I test the resource's access for different users in a context block a) not signed in b) non-admin user signed in- I call my own helper method, login

Re: [rspec-users] instance variables from outer before blocks don't persist?

2011-10-13 Thread Patrick J. Collins
> > ... But I just tried doing this in RSpec with before :each, and it seems > > that > > my @foo ivar is non existant inside the inner context.. Is this the way > > it's supposed to be? > > post the whole example Nevermind.. I figured out what I was doing wrong. Patrick J. Collins http:

Re: [rspec-users] Assertions for asynchronous behaviour

2011-10-13 Thread Alex Chaffee
FYI, I've just released Wrong 0.6.0 with eventually "as is" -- i.e. no extra exception message fiddling. I also added a message param to Wrong's "d" method, e.g. d("math is hard") { 2 + 2 } prints math is hard: (2 + 2) is 4 to the console. Useful for debugging (which is what "d" stands

Re: [rspec-users] assert_select - to do negative tests - need help with syntax please :)

2011-10-13 Thread David Chelimsky
On Oct 13, 2011, at 4:40 AM, Gordon Yeong wrote: > > This ^^ does include :name => "". > > What happens when you just run > > assert_select "input#brand_created_by", false > > this runs successfully but how do I do it with the :name? :( I just want to > be complete and explicit :) I do

Re: [rspec-users] assert_select - to do negative tests - need help with syntax please :)

2011-10-13 Thread Gordon Yeong
> > > This ^^ does include :name => "". > > What happens when you just run > > assert_select "input#brand_created_by", false > > this runs successfully but how do I do it with the :name? :( I just want to be complete and explicit :) ___ rspec-users

Re: [rspec-users] rspec 2.7.0.rc1 is released!

2011-10-13 Thread Ash Moran
On 10 Oct 2011, at 15:22, David Chelimsky wrote: > Nope. Wanna add one? > > The basic idea is: > > shared_examples Enumerable do Aye, that's what I figured :-) I've wished for that for a long time. I'm away for a bit but I'll see if I get chance soon. Ash -- http://www.patchspace.co.uk/ h