The subdirectory determines what *type* of spec they are -- that is, either what type of unit they are testing models, controllers, mailers, etc.
or what test framework they're using spec/features -> Capybara spec/javascripts -> Jasmine etc. Some RSpec functions are automatically made available to certain types of spec; e.g. controller specs get `get`, `post`, `put`, methods (to simulate an HTTP call of the appropriate type). Start wherever you are! If you're writing a model, write a spec in spec/models. - A On Tue, Jul 28, 2015 at 12:42 AM, Askar <[email protected]> wrote: > I'm very new to rspec. > > Can't figure out where to start writing specs from? > > In the Rails 4 in Action they starting from writing in spec/features. > In http://everydayrails.com/ they start from spec/models. > Not sure if there any other approach... > > Which approach is recommended? > > -- > 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/41867e14-ce60-4e43-806a-d1740744089c%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Alex Chaffee - [email protected] http://alexchaffee.com http://codelikethis.com http://twitter.com/alexch -- 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/CAMf%3DvNpqgKAwTbTxkQDM67Krb89HGeP%2BF9HOO-Lrynh9FEjCfA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
