Re: [rspec-users] Specs and Libs

2007-10-09 Thread Eivind Uggedal
> > On 10/4/07, Nathan Sutton < [EMAIL PROTECTED]> wrote: > > > How would I go about writing specs for a lib, particularly one with > > > all protected and private methods. I'm trying to spec the > > > AuthenticatedSystem library from the rails restful_authentication > > > plugin: > > > http://pas

[rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

2007-10-09 Thread Daniel Mantilla
I followed the directions on the site: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_1_0_8/rspec_on_rails ruby script/generate rspec And apparently everything was ok. But when I do a "rake spec

Re: [rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

2007-10-09 Thread Daniel Mantilla
Please disregard this. This topic already exist on this forum, I thought my post didn't go through. Daniel -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-user

Re: [rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

2007-10-09 Thread Daniel Mantilla
I removed both plugins and reinstalled them using the CURRENT tag. Then ran the 'ruby script/generate rspec' and finally the 'rake spec', but I get the same error. Here is the full trace: C:\Projects\Rails\Workspace\MPS>rake spec --trace C:0:Warning: require_gem is obsolete. Use gem instead. (i

[rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Matt Patterson
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it's plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn't catch that) Thanks, Matt -- Matt Patterson | Design & Code | http://

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Lance Carlson
I'm not sure you want to test that the yield call works, but merely that it is being called because you will end up creating an integration test otherwise. I would suggest just stubbing out the yield call. I'm pretty sure you can just do template.stub!(:yield) ? On 10/9/07, Matt Patterson <[EMAIL

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Lance Carlson
or if you want to test that it is being called.. you could do template.should_receive(:yield).and_return('') On 10/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > I'm not sure you want to test that the yield call works, but merely > that it is being called because you will end up creating an > in

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Jean-François Trân
2007/10/9, Lance Carlson <[EMAIL PROTECTED]>: > or if you want to test that it is being called.. you could do > template.should_receive(:yield).and_return('') I'm missing a point... how can you expect to receive a :yield message since yield is a Ruby keyword ? -- Jean-François. -- Ruby ( htt

Re: [rspec-users] Ignore directory with Autotest?

2007-10-09 Thread Dominic Sisneros
Then it is a matter of changing your code or adding a .autotest like so: Autotest.add_hook :run do |at| at.exceptions = /generated_output/ end This allows you to ignore directories that match a regexp. Unfortunately, there is no hook in Autotest to allow you to ignore single file regexp which

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Lance Carlson
It is a ruby keyword, but isn't also just a method being called in the view? On 10/9/07, Jean-François Trân <[EMAIL PROTECTED]> wrote: > 2007/10/9, Lance Carlson <[EMAIL PROTECTED]>: > > or if you want to test that it is being called.. you could do > > template.should_receive(:yield).and_return(''

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Lance Carlson
Also maybe instead of and_return.. you would do and_yield('') On 10/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > It is a ruby keyword, but isn't also just a method being called in the view? > > On 10/9/07, Jean-François Trân <[EMAIL PROTECTED]> wrote: > > 2007/10/9, Lance Carlson <[EMAIL PROTE

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Matt Patterson
On 9 Oct 2007, at 19:55, Jean-François Trân wrote: > 2007/10/9, Lance Carlson <[EMAIL PROTECTED]>: >> or if you want to test that it is being called.. you could do >> template.should_receive(:yield).and_return('') > > I'm missing a point... how can you expect to receive a :yield message > since yi