> > 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
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
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
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
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://
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
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
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
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
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(''
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
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
12 matches
Mail list logo