Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a bin/rspec helper that can run specs inside components
For when a change affects multiple components or for tools relying on bin/rspec this helper will make things a lot easier. Will take in both paths and options and run the specs for each component speparately keeping the options. Example: $ bin/rspec core/spec/models/spree/exchange_spec.rb api/spec/features/checkout_spec.rb -f doc Will give the following output: ``` $ cd core; bundle exec rspec -f doc /Users/elia/Code/Nebulab/solidus/core/spec/models/spree/exchange_spec.rb; cd - Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 190 Spree::Exchange #description describes the return items' change in options #perform! creates shipments for the order with the return items exchange inventory units when it cannot create shipments for all items raises an UnableToCreateShipments error #display_amount is the total amount of all return items .param_key is expected to eq "spree_exchange" #to_key is expected to be nil Finished in 2.22 seconds (files took 3.27 seconds to load) 6 examples, 0 failures Randomized with seed 190 $ cd api; bundle exec rspec -f doc /Users/elia/Code/Nebulab/solidus/api/spec/features/checkout_spec.rb; cd - Randomized with seed 55051 Api Feature Specs is able to checkout with the update request is able to checkout with individualized requests is able to checkout with the create request Finished in 3.15 seconds (files took 3.3 seconds to load) 3 examples, 0 failures Randomized with seed 55051 ``` The first line is always the executed command that can be copied and pasted as it is.
- Loading branch information