[rspec-devel] Regarding DSL::Configure

David Chelimsky dchelimsky at gmail.com
Sun Jul 22 15:09:34 EDT 2007

On 7/22/07, Evgeny <evgeny.zislis at gmail.com> wrote:
> Greetings rSpec developers!
> According to rSpec documentation, in Spec::Runner.configuration I am
> able to include various helpers to my behaviors. Like so:
>   config.include ActionView::Helpers, :behaviour_type => :helpers
> So I wanted to do something like :
>    config.with_options :behaviour_type => :helpers do |config|
>     config.include Haml::Helpers
>     config.include ActionView::Helpers
>     config.prepend_before :all do
>       @haml_is_haml = true
>       @haml_stack = [Haml::Buffer.new]
>     end
>   end
> Which is supported in Rails (Object#with_options), since this seems to
> be quite DRY and logical. But it didn't work, because config.include
> doesn't accept hashes (thats the error anyway).
> Using rSpec 1.05.
> Anyone else thinks this is a good idea, and should work?
> Anyone knows whats the problem and why its broken?

I *think* that I've fixed this in trunk. Can you grab the latest and
see if you still have this problem? (I can't be sure because I can't
produce the same error you're reporting - but I did get a different
error that led me to some refactoring).


> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

More information about the rspec-devel mailing list