Yep, it's always case by case. I will often use rspec-rails' validate_* assertions, not to test that the framework does what I want, but to document that the class *has* those validations.
On 11 January 2016 at 10:49, Chris Berkhout <[email protected]> wrote: > I wouldn't write specs for that either, but I wanted to mention a more > general point... > > >> ... "testing the framework". I tend to find tests which assert the >> framework did its job correctly of low value. >> > > It depends on the developers and the framework. Writing a spec of > framework/library behaviour can be a useful exercise if there are details > you're unfamiliar with. When depending on things working in a certain way > that isn't documented elsewhere, I find specs can be a good way to verify > and document your assumptions. > > I've done it before to assert the behaviour of network IO when not > gracefully closed, certain aspects of BigDecimal and PostgreSQL isolation > levels. I usually wouldn't object if someone wanted to remove such specs > from a project, but if they are done right they probably won't add much of > a maintenance overhead. > > Cheers, > Chris > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" 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]. > Visit this group at https://groups.google.com/group/rails-oceania. > For more options, visit https://groups.google.com/d/optout. > -- Garrow Bedrossian + 61 401 532 538 -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" 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]. Visit this group at https://groups.google.com/group/rails-oceania. For more options, visit https://groups.google.com/d/optout.
