[Rspec-devel] Patch that allows method definitions inside of a context
aslak.hellesoy at gmail.com
Sun Jul 9 22:54:09 EDT 2006
Great stuff Brian - you're a metaprogramming whiz!
I'd like to apply this patch, what do you others think?
On 7/9/06, Brian Takita <brian.takita at gmail.com> wrote:
> I submitted a patch that allows you to define methods inside of the context
> block rather than inside of the setup method block.
> For example, this patch allows:
> require File.dirname(__FILE__) + '/../lib/spec'
> context "Rspec allow you to define custom methods" do
> specify "Rspec should allow you to define methods" do
> @a_method_called.should.be true
> def a_method
> @a_method_called = true
> This patch also does not break the behaviour where methods can be defined
> inside of the setup block.
> Thank you,
> Brian Takita
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
More information about the Rspec-devel