Sha256: 0ee4c3f47edcfd462ba3fc9aff9b3f4c0e721f1b86b318ac31b117308eedd98d

Contents?: true

Size: 1.17 KB

Versions: 39

Compression:

Stored size: 1.17 KB

Contents

# Deliberately named _specs.rb to avoid being loaded except when specified

describe "pending spec with no implementation" do
  it "is pending"
end

describe "pending command with block format" do
  context "with content that would fail" do
    it "is pending" do
      pending do
        expect(1).to eq(2)
      end
    end
  end

  context "with content that would pass" do
    it "fails" do
      pending do
        expect(1).to eq(1)
      end
    end
  end
end

describe "passing spec" do
  it "passes" do
    expect(1).to eq(1)
  end
end

describe "failing spec" do
  it "fails" do
    expect(1).to eq(2)
  end
end

describe "a failing spec with odd backtraces" do
  it "fails with a backtrace that has no file" do
    require 'erb'

    ERB.new("<%= raise 'foo' %>").result
  end

  it "fails with a backtrace containing an erb file" do
    e = Exception.new

    def e.backtrace
      ["/foo.html.erb:1:in `<main>': foo (RuntimeError)",
        "   from /lib/ruby/1.9.1/erb.rb:753:in `eval'"]
    end

    def e.message
      # Redefining message steps around this behaviour
      # on JRuby: http://jira.codehaus.org/browse/JRUBY-5637
      self.class.name
    end

    raise e
  end
end

Version data entries

39 entries across 39 versions & 8 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.99.2 spec/rspec/core/resources/formatter_specs.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.99.1 spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.99.0 spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.99.0.rc1 spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.14.8 spec/rspec/core/resources/formatter_specs.rb
rspec-core-2.99.0.beta2 spec/rspec/core/resources/formatter_specs.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb