[Archivesspace_Users_Group] running individual rspec tests
james at hudmol.com
Thu Mar 24 20:27:23 EDT 2016
You can say something like this:
build/run backend:test -Dexample="User model can yield a list of all permissions”
To run a single test, or just “User model” to run all of the user model tests. It actually just does a match, so you could say:
build/run backend:test -Dexample="permissions”
And it would run any test it finds with “permissions” its description.
A test’s full description is a concat of the ‘describe' blocks and ‘it' block it is contained in, so in the top example, it’s spec looks like this:
describe 'User model' do
it "can yield a list of all permissions" do
There is also a way to run only a specific _spec.rb file, but I can’t remember what it is. ;)
Hope that helps.
> On Mar 25, 2016, at 6:57 AM, Esha Datta <esha at nyu.edu> wrote:
> Thanks to all of those who have helped me so far along the road to plugin development. The time now has come to write tests for the plugin. I noticed that in the dev instance I can specify which part of the application to test, for example: the backend, frontend, common, or all. Is there a way to run just one test or one suite of tests from the plugin? I'd like to have both options if possible. That way, when I'm checking on the tests, I don't have to wait for the backend tests to run every time. Thanks in advance for your help!
> In MRI rails projects, I've managed to just do rspec spec/dir/whatever_suite_of_tests and if I want to specify a line or something: rspec spec/dir/whatever_suite_of_tests:line number, can I try something like this in archivesspace?
> I tried reading through the build.xml, specifically, the backend:test part but I wasn't really getting how to specify a plugin test...I see that I runs through all the backend tests.
> Esha Datta
> NYU Libraries
> !DSPAM:56f446ce244601971738366! _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Archivesspace_Users_Group