Permalink
Browse files

Merge the two profile config cukes.

  • Loading branch information...
1 parent 44c1cae commit abd4b30a1b9043b461a207d02150f88484ecd331 @myronmarston myronmarston committed Jan 1, 2013
Showing with 6 additions and 45 deletions.
  1. +6 −4 features/configuration/profile.feature
  2. +0 −41 features/configuration/profile_examples.feature
@@ -1,8 +1,10 @@
-Feature: profile examples
+Feature: Profile examples
- Use the profile_count option to tell RSpec have many specs to include in the profile:
-
- RSpec.configure { |c| c.profile_examples = 15 }
+ The `--profile` command line option (available from `RSpec.configure` as
+ `#profile_examples`), when set, will cause RSpec to dump out a list of
+ your slowest examples. By default, it prints the 10 slowest examples,
+ but you can set it to a different value to have it print more or fewer
+ slow examples.
Background:
Given a file named "spec/spec_helper.rb" with:
@@ -1,41 +0,0 @@
-Feature: profile examples
-
- Use the profile_examples option to tell RSpec to report the times
- for the 10 slowest examples.
-
- RSpec.configure { |c| c.profile_examples = true }
-
- Background:
- Given a file named "spec/spec_helper.rb" with:
- """ruby
- RSpec.configure { |c| c.profile_examples = true }
- """
-
- Scenario: profile_examples defaults to false
- Given a file named "spec/example_spec.rb" with:
- """ruby
- describe "something" do
- it "passes" do
- end
-
- it "also passes" do
- end
- end
- """
- When I run `rspec spec/example_spec.rb`
- Then the output should not contain "Top 2 slowest examples"
-
- Scenario: profile_examples reports on the slowest features
- Given a file named "spec/example_spec.rb" with:
- """ruby
- require 'spec_helper'
- describe "something" do
- it "passes" do
- end
-
- it "also passes" do
- end
- end
- """
- When I run `rspec spec/example_spec.rb`
- Then the output should contain "Top 2 slowest examples"

0 comments on commit abd4b30

Please sign in to comment.