> > Here is what I did to conform my gem spec to the conventions suggested
> > athttps://www.relishapp.com/rspec/rspec-core/docs/example-groups/shared......
>
> > my spec/spec_helper.rb...
>
> > $LOAD_PATH.unshift(File.dirname(__FILE__))
> > $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
>
> You don't need to modify the ^^ LOAD_PATH ^^ here - it's already done for you 
> by RSpec.

OK - I made this change, thanks...

> > finally, here are the top lines of the spec/support/
> > shared_sample.rb...
>
> > extend RSpec::Core::SharedContext
>
> > shared_examples_for "Rum92265::A3::PartB" do
>
> You don't need both "extend RSpec::Core::SharedContext" and 
> "shared_examples_for". Just one or the other.

...and made this change...

> If the idea here is to expose shared_examples to users of your gem, I'd 
> actually store them under lib. Something like:
>
> lib/rum_92265/spec_support.rb # requires 
> rum_92265/spec_support/shared_examples.rb
> lib/rum_92265/spec_support/shared_examples.rb
>
> Now you can require 'rum_92265/spec_support' in your own spec/spec_helper.rb, 
> and you can tell your users to do the same.

...finally, I did this, too. These steps added up to a successful
result for me.

Thank you very much for your detailed and helpful response.

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

Reply via email to