/vendor/bundle/jruby/2.1/gems/rspec-core-2.14.8/features/metadata/described_class.feature

https://github.com/delowong/logstash · Gherkin Specification · 17 lines · 14 code · 3 blank · 0 comment · 0 complexity · 7c27dc0d28a1f2bad0c6d4485c3a19d4 MD5 · raw file

  1. Feature: described class
  2. If the first argument to the outermost example group is a class, the class is
  3. exposed to each example via the described_class() method.
  4. Scenario: access the described class from the example
  5. Given a file named "spec/example_spec.rb" with:
  6. """ruby
  7. describe Fixnum do
  8. it "is available as described_class" do
  9. described_class.should eq(Fixnum)
  10. end
  11. end
  12. """
  13. When I run `rspec spec/example_spec.rb`
  14. Then the example should pass