Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit a9ea58b

Browse files
committed
Add a spec for example groups
Currently failing :(
1 parent d28fce9 commit a9ea58b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec/rspec/core/example_group_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,5 +1912,23 @@ def group_ids group
19121912
expect(group.examples.length).to eq(0)
19131913
expect(original_ids).to_not eq(group_ids(group))
19141914
end
1915+
1916+
it 'allows extensions to add `method` to the DSL without causing problems' do
1917+
http_testing_extension = Module.new do
1918+
attr_reader :http_method
1919+
def method(meth); @http_method = meth; end
1920+
end
1921+
1922+
describe_successfully do
1923+
extend http_testing_extension
1924+
method :get
1925+
1926+
describe('group') do
1927+
it "allows `method` to specify the HTTP method" do
1928+
expect(self.class.http_method).to eq(:get)
1929+
end
1930+
end
1931+
end
1932+
end
19151933
end
19161934
end

0 commit comments

Comments
 (0)