Sha256: 4bc5a22e3ffaf9012856806ccf670df0539c5bbf2e44154587ff022ddc9d4043

Contents?: true

Size: 528 Bytes

Versions: 7

Compression:

Stored size: 528 Bytes

Contents

Feature: described class

  If the first argument to the outermost example group is a class, the class is
  exposed to each example via the `described_class()` method.

  Scenario: Access the described class from the example
    Given a file named "spec/example_spec.rb" with:
      """ruby
      RSpec.describe Fixnum do
        it "is available as described_class" do
          expect(described_class).to eq(Fixnum)
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the example should pass

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
opal-rspec-0.8.0 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.8.0.alpha3 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.8.0.alpha2 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.8.0.alpha1 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.7.1 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.7.0 rspec-core/upstream/features/metadata/described_class.feature
opal-rspec-0.7.0.rc.2 rspec-core/upstream/features/metadata/described_class.feature