-
-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example groups can override the default ordering #1025
Commits on Sep 27, 2013
-
Configuration menu - View commit details
-
Copy full SHA for 7e11746 - Browse repository at this point
Copy the full SHA 7e11746View commit details -
Example groups can override the default ordering.
Also OrderingRegistry needs docs.
Configuration menu - View commit details
-
Copy full SHA for a755aa6 - Browse repository at this point
Copy the full SHA a755aa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e177c1d - Browse repository at this point
Copy the full SHA e177c1dView commit details -
Combine ordering logic into one file.
- There's no need for so many tiny files. - 1.9 has known perf issues with require, so doing one require instead of 4 should speed up pert a bit. - This keeps the ordering logic all in one small (< 100 LOC) file.
Configuration menu - View commit details
-
Copy full SHA for 24c2889 - Browse repository at this point
Copy the full SHA 24c2889View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4564d11 - Browse repository at this point
Copy the full SHA 4564d11View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e74b94 - Browse repository at this point
Copy the full SHA 7e74b94View commit details -
Configuration menu - View commit details
-
Copy full SHA for f88f3c2 - Browse repository at this point
Copy the full SHA f88f3c2View commit details -
This spec failed on 2.0. This change makes it more resilient.
Configuration menu - View commit details
-
Copy full SHA for 54691e8 - Browse repository at this point
Copy the full SHA 54691e8View commit details -
- Use two of them (one for examples, one for groups), rather than having a single one with separate, duplicated methods for examples vs groups. - Rename `resolve_example_ordering` to `#[]`. It has the semantics of a hash lookup, after all. - Add `global_ordering` for the case where that is explicitly needed.
Configuration menu - View commit details
-
Copy full SHA for 87760bd - Browse repository at this point
Copy the full SHA 87760bdView commit details -
Change dependency injection of configuration.
To me, it makes more sense to pass it to `Random.new` and to retain it as instance state on that object. Injecting it in the `order` method is a little odd, as it complicates the `#order` interface for all the other strategies, even those that don't use the configuration at all.
Configuration menu - View commit details
-
Copy full SHA for 60263d6 - Browse repository at this point
Copy the full SHA 60263d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc318d0 - Browse repository at this point
Copy the full SHA cc318d0View commit details -
Improve isolation of order specs.
* Cleanup extra files created by individual specs. * Change to the aruba tmp dir before running the command. This is important so that it doesn't pick up options in our `.rspec` file.
Configuration menu - View commit details
-
Copy full SHA for 65b735e - Browse repository at this point
Copy the full SHA 65b735eView commit details -
Remove inconsistent #order and #randomize? config methods.
* Examples and groups can be ordered differently. * Individual groups can be ordered differently. As such, a global `order` reader method doesn't make a lot of sense (although, assigning the global default via `#order=` still does, I think). Also: * This exposed that the ordering force logic (e.g. to ensure CLI `--order rand` takes precedence over `RSpec.configure`) didn't work properly since it simply ensured `order` returned the forced option but did not ensure the global ordering was set properly. I've fixed this. * Don't clear the seed when setting the order to default. An individual example group may still be run in random order and will need the seed. There's really no reason to clear it. * Base our decision of whether or not to print the seed at the end of the run on whether or not the random strategy ever got used, rather than whether or not `random` is the global strategy. If only one example group used the random strategy we would want it to print, but the old logic would not have done so.
Configuration menu - View commit details
-
Copy full SHA for fd994ab - Browse repository at this point
Copy the full SHA fd994abView commit details -
Refactor: extract Ordering::ConfigurationManager.
There's enough ordering config options that they should be grouped into their own object.
Configuration menu - View commit details
-
Copy full SHA for a1fb7e3 - Browse repository at this point
Copy the full SHA a1fb7e3View commit details -
Refactor: refine how we pass config state to Reporter.
It's more natural to just pass the config instance in the initializer, rather than passing the seed to `report` and referencing `RSpec.configuration`.
Configuration menu - View commit details
-
Copy full SHA for d4e05fd - Browse repository at this point
Copy the full SHA d4e05fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e94b81 - Browse repository at this point
Copy the full SHA 7e94b81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 537bfdd - Browse repository at this point
Copy the full SHA 537bfddView commit details -
Use groups vs example strategy for groups vs examples.
We were wrongly always using the example strategy for both groups and examples.
Configuration menu - View commit details
-
Copy full SHA for 06049c2 - Browse repository at this point
Copy the full SHA 06049c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a500b52 - Browse repository at this point
Copy the full SHA a500b52View commit details -
For the case of an unrecognized order symbol, I want to have it take a fallback block (like the semantics of Hash#fetch), but #[] can't accept a block so we have to change the API.
Configuration menu - View commit details
-
Copy full SHA for 6e6f57b - Browse repository at this point
Copy the full SHA 6e6f57bView commit details -
Print a warning when given an unrecognized :order option.
Otherwise it may confuse users when they misspell the ordering.
Configuration menu - View commit details
-
Copy full SHA for 2f1d906 - Browse repository at this point
Copy the full SHA 2f1d906View commit details -
Configuration menu - View commit details
-
Copy full SHA for 857b11b - Browse repository at this point
Copy the full SHA 857b11bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61492dc - Browse repository at this point
Copy the full SHA 61492dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e7eaa57 - Browse repository at this point
Copy the full SHA e7eaa57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69c12db - Browse repository at this point
Copy the full SHA 69c12dbView commit details -
Refactoring: use
:global
for global ordering.…rather than having special `set_global_ordering` and `global_ordering` methods. Also, simplify `Ordering::Registry#fetch`: - No need to handle `nil`; the caller can pass :global. - No need to handle callables; that's a bit of complexity we don't need. Callables can be registered. - No need to convert the ordering name `to_sym`; it wasn't spec'd and I'd rather require folks pass symbols.
Configuration menu - View commit details
-
Copy full SHA for 9b16f3e - Browse repository at this point
Copy the full SHA 9b16f3eView commit details -
- Don't have separate `groups`, `examples` and `groups_and_examples` methods. There are very few use cases for having separate logic for groups vs examples and it doesn't justify the added complexity to have separate APIs. If you need to order them separately, put a conditional in your ordering strategy that branches based on the type of the first item in the list. - Remove legacy `order_xyz` methods. These set the global ordering but didn't make that clear. Instead, the global ordering can be set by `register_ordering :global`.
Configuration menu - View commit details
-
Copy full SHA for 10aca90 - Browse repository at this point
Copy the full SHA 10aca90View commit details -
Rename
--default
ordering to--defined
.`--default` was never a good name. (Consider that if we had made `--random` the default, `--default` would have been even more confusing).
Configuration menu - View commit details
-
Copy full SHA for 57ab90a - Browse repository at this point
Copy the full SHA 57ab90aView commit details
Commits on Oct 1, 2013
-
Configuration menu - View commit details
-
Copy full SHA for c5979da - Browse repository at this point
Copy the full SHA c5979daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6477ddf - Browse repository at this point
Copy the full SHA 6477ddfView commit details -
Configuration menu - View commit details
-
Copy full SHA for df880f0 - Browse repository at this point
Copy the full SHA df880f0View commit details