On May 13, 7:08 pm, David Chelimsky <dchelim...@gmail.com> wrote:
>
> I actually think that what you're doing is perfectly fine. Just not
> the common case. That's why I think it's OK to support explicitly
> assigning self as subject, but not making that a default behaviour.
>
> If it were me, and it's *not*, but if it were, I'd wrap those helpers
> in an object and make explicit calls.

you mean something like this?

class PageHelper
  def has_text?
   # blah
  end
end

describe "cool page" do
   subject {PageHelper.new}

   before :all do
      PageHelper.new
   end

   it "has something" do
     should have_text("blah")
   end

end

Doesn't seem too bad. I will give it a thought!

Jarmo
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to