Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pending spec for shared context that exposes Issue #632 #634

Closed
wants to merge 1 commit into from

3 participants

@gja

No description provided.

@travisbot

This pull request passes (merged 5fc19b6 into 5f730b0).

@myronmarston

Thanks, @gja. It took us a long time to integrate this but we eventually did thanks to the work of @michihuber in #845.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 12, 2012
  1. @gja
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 0 deletions.
  1. +22 −0 spec/rspec/core/shared_context_spec.rb
View
22 spec/rspec/core/shared_context_spec.rb
@@ -34,6 +34,28 @@
after_all_hook.should be_true
end
+ it "runs the before each hooks in configuration before those of the shared context" do
+ ordered_hooks = []
+ RSpec.configure do |c|
+ c.before(:each) { ordered_hooks << "config" }
+ end
+
+ RSpec.world.shared_context "before each stuff", :example => :before_each_hook_order do
+ before(:each) { ordered_hooks << "shared_context"}
+ end
+
+ group = RSpec::Core::ExampleGroup.describe :example => :before_each_hook_order do
+ before(:each) { ordered_hooks << "example_group" }
+ example {}
+ end
+
+ group.run
+
+ pending "Issue #632" do
+ ordered_hooks.should == ["config", "shared_context", "example_group"]
+ end
+ end
+
it "supports let" do
shared = Module.new do
extend RSpec::SharedContext
Something went wrong with that request. Please try again.