Hi,

rails ships for instance with ActiveModel::Lint::Tests. I can include this 
module into my test case and I'm sure my implemantation
behaves like ActiveModel.

What is best practice to do such things with rspec(3)?

Do I have to use shared example groups and use the magic strings / shared 
example name around?

Ok, I can do some thing like this:

module SharedSpec
  NAME = 'shared spec'

  shared_examples SharedSpec::NAME do |params|

  end
end

But I can't ensure that NAME is uniq and validating params is also not so 
easy like when I include a module into a class.

Does another approach exists?


regards
dieter

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/662822a3-1371-45da-bac1-704da04873b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to