Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test report for an almost empty spec file displays '3 passed' #30

Open
bankair opened this issue Jul 1, 2015 · 1 comment
Open

Test report for an almost empty spec file displays '3 passed' #30

bankair opened this issue Jul 1, 2015 · 1 comment

Comments

@bankair
Copy link

bankair commented Jul 1, 2015

Environment

  • vim-rspec version: last available one (cf7eb2f)
  • rspec version: 3.2.3
  • vim version: NVIM 0.0.0-alpha+201504141749 (compiled Apr 15 2015 11:57:57)

Description

Let's imagine I'm using an almost empty file like so:

class Foo
  def answer
    42
  end
end

describe Foo do
  describe '#answer' do
  end
end

When executing :RunSpec on the file, the result is:


+-- 3 passed --------------------------------------------------
Finished in 0.00015 seconds

Damn !?! 3 tests passed ? where does that come from ?
Let's expand the result report:


++++++++++++++++++++++++++++++
+ PASS: All 0 Specs Pass!
++++++++++++++++++++++++++++++
Finished in 0.00015 seconds

Seems like 3 lines -> 3 passed

@bankair
Copy link
Author

bankair commented Jul 1, 2015

The very same thing happen if a add a single test:

class Foo
  def answer
    42
  end
end

describe Foo do
  let (:instance) { Foo.new }
  describe '#answer' do
    it { expect( instance.answer ).to eq 42 }
  end
end

The result being:


+-- 3 passed --------------------------------------------------
Finished in 0.00088 seconds

[Foo]

[#answer]
+ should eq 42

Which expand to:


++++++++++++++++++++++++++++++
+ PASS: All 1 Specs Pass!
++++++++++++++++++++++++++++++
Finished in 0.00088 seconds

[Foo]

[#answer]
+ should eq 42

Could be related to rpsec 3.2.3 output format, then ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant