Skip to content
Browse files

Added spec for patched case

  • Loading branch information...
1 parent ffeaf62 commit a4c33a514120f42dbf57ea5bf75b0ecf9f007c7a @pyromaniac pyromaniac committed Jan 29, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/rspec/core/example_group_spec.rb
View
16 spec/rspec/core/example_group_spec.rb
@@ -293,6 +293,22 @@ def metadata_hash(*args)
group.run.should be_true
end
end
+
+ context "and metadata redefinition after `described_class` call" do
+ it "is the redefined level constant" do
+ group = ExampleGroup.describe(String) do
+ described_class
+ metadata[:example_group][:described_class] = Object
+ describe :symbol do
+ example "described_class is Object" do
+ described_class.should eq(Object)
+ end
+ end
+ end
+
+ group.run.should be_true
+ end
+ end
end
context "in a nested group" do

0 comments on commit a4c33a5

Please sign in to comment.
Something went wrong with that request. Please try again.