[Rspec-devel] Rspec on Rails is broken in SVN

Brian Takita brian.takita at gmail.com
Sun Jul 23 17:41:04 EDT 2006

> I'm still getting a nil.should_be error on the rails_plugin_fix
> branch. It might be because I moved that file from lib to the template
> dir and merges got lost. (Subversion didn't tell me anything though).

It looks like test_helper.rb was not calling
require File.expand_path(File.dirname(__FILE__) +

The reason I moved it is that the gem's lib directory isn't
> automatically available, so I moved the runtime code to a plugin
> instead. (This plugin gets installed by the generator).
> Anyway, I think the packaging is

> It looks like you mostly copied some sugar code into
> > rspec_on_rails.rb. I'm a little concerned about the duplication. Sugar
> > keeps changing whenever we find a case we forgot to test - now that's
> > going to have to happen in two places.
> What do you think about just keeping the NilClass patching in
> > sugar.rb? At least then it's all in the same file.

I created a method named Spec::Api::Sugar.sugarize(klass) that takes a class
or module and adds the new method_missing method.
Instead of:
class Object
  include Spec::Api::Sugar
one would use:

Rspec on Rails calls
to fix the bug.

I agree - it's ok to patch core on this branch.

 Does that mean I should merge this branch into the trunk?

> Also, when I grabbed the branch and followed the directions in the
> > README file in rspec_on_rails, I got the following:
> >
> > ../../bin/test2spec --template spec/test2spec.erb --specdir
> > spec/models test/unit
> > Writing translated specs to spec/models
> > Creating  : spec/models/animal_spec.rb
> > Failed to translate     ActionController::IntegrationTest
> >
> You can run test2spec with --verbose to get more info.
> Let's focus on the core features of RSpec on Rails for now, and get it
> back to trunk as soon as the important stuff (i.e. running specs) is
> ok. We can work on the translation later. Translation of Rails tests
> should be part of rspec on rails' pre_commit.

Good idea.

> > So there still seems to be a translation problem. I won't have a
> > chance to look at this for probably a week, so if anyone else has
> > time, please check it out.
> >
> Me neither - I'm heading to Agile2006, as is David.

Have a good time.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20060723/880b8534/attachment.html 

More information about the Rspec-devel mailing list