* 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).
- 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
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.
…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.
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