Sha256: ed39ba9f2dcf0dd08c74530e74e9420b0ff0d3c3c33118a9442f0c1ba4e13c1d

Contents?: true

Size: 516 Bytes

Versions: 51

Compression:

Stored size: 516 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
      describe Fixnum do
        it "is available as described_class" do
          described_class.should eq(Fixnum)
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the example should pass

Version data entries

51 entries across 51 versions & 13 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/metadata/described_class.feature
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/metadata/described_class.feature
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/metadata/described_class.feature
rspec-core-2.99.2 features/metadata/described_class.feature
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/metadata/described_class.feature
rspec-core-2.99.1 features/metadata/described_class.feature
rspec-core-2.99.0 features/metadata/described_class.feature
rspec-core-2.99.0.rc1 features/metadata/described_class.feature
rspec-core-2.14.8 features/metadata/described_class.feature
rspec-core-2.99.0.beta2 features/metadata/described_class.feature
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/features/metadata/described_class.feature
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/features/metadata/described_class.feature
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/features/metadata/described_class.feature