* These are built in exclusion filters that can be overriden. * When you configure a filter, it now merges with existing filters rather than completely overriding them. * A spec/group is now filtered if ANY of the filter conditions apply; before it required ALL to apply. * Filter lambdas can now accept a 2nd argument that is the metadata hash--this allows checking to see if the key is even in the hash (necessary for the :if filter).
- Closes #217.
- caller is only used to determine file and line number as metadata is initialized. There is no need to store it. - Also, the previous commit reduces the need for analysis of the caller stack. We therefore don't need to sling it around within the rspec codebase. - Running the following 5000 times took 2.77 seconds before these last two commits, 1:58 after: describe "something" do it "does something" do 1.should eq(1) end end Please enter the commit message for your changes. Lines starting
- turns out it is faster to inject over an array than to collection a bunch of arrays and flatten them
This isn't a good permanent solution, but it's better than the current behavior. Currently, RSpec's error handling raises its own error for an error in after(:all), which gives the user a confusing error message and hides the user's error message.
This was present in RSpec 1 and provides a quick way to temporarily make a spec pending.
…ple groups. Previously, before/after(:all) hooks in an example group with a nested example group would always be run, even if none of the specs in the example group were run due to inclusion/exclusion filtering. We should only run the before/after(:all) hooks if there are any corresponding examples to run. - Closes #161.
This reverts commit c6f7806. - needed to revert because this broke the rake task with rcov
- Closes #82.
Now, when you hit CTRL-C: - any subsequent examples in the current group return immediately without running or reporting - after(:all) hooks in that group are run - any subsequent example groups are removed from the global list of groups to run - after(:all) hooks in parent groups (if INT was received while a nested group was running) are run - after(:suite) hooks are run - standard reporting ensues
- finishes current example - runs after alls - reports examples run up to and including the one that was running when the interrupt was received - Closes #32.
Pending in before(:all) don't fail, they just don't work, so that is something
- ensures that included modules that manipulate metadata do so before subsequent modules are processed, allowing earlier modules to effect the outcome of whether or not to include subsequent modules - same for extended modules
…with_args. This allows parameterized shared example groups to be used on ruby 1.8.6.
We don't want to expose instance_exec as a public API; it's just for RSpec's internal use. I also added some guard conditionals to the implementation so that we only use the 1.8.6 instance_exec hack if it's really necessary.