Permalink
Browse files

Pending spec for shared context that exposes Issue #632

  • Loading branch information...
gja authored and michihuber committed Jun 12, 2012
1 parent 5ab26ec commit 7ff0e81f747f7bcc5cc20ac6150a0f7e878727f1
Showing with 22 additions and 0 deletions.
  1. +22 −0 spec/rspec/core/shared_context_spec.rb
@@ -34,6 +34,28 @@
expect(after_all_hook).to 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

0 comments on commit 7ff0e81

Please sign in to comment.