I have a concept problem, I am working on a rails project & as per my knowledge both the test & spec are used for tests. Where test refers to unit testing & spec refers to integration testing. But I want to have to have full idea about those two folders & if they both refers to test then what is the major difference between them?
specification (meaning test file). was idiomatic in jasmine I think. It's loosely a way of writing tests, as a specification (or set of expectations) rather than a more assertive style.
So, test folder contains test source files under src/test/java , and test resources - under src/test/resources . Also as a good practice Spring Boot includes test class, that validates that your application context starts properly.
What are test specifications? Test specifications (specs) are the string used to identify tests when they're run by a test runner. Below you can see an example of the output from a failed test. You can see where the specification and assertion error is used to describe how a test failed.
Request specs reside in the spec/requests directory. The directory can also be named integration or api . Feature specs reside in the spec/features directory.
Rails default testing framework gives you test folder for you rails default testing framework, if you want to use RSpec testing framework, which gives you folder called 'spec' RSPEC, it is your wish to select which option, RSPEC specs are more readable, people use both ways.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With