tags:

views:

38

answers:

2

When I try and define (but not implement an it test) (pending method) using RSpec

describe "test" do
  it "should not fail, but does"
end

I get this error when I try and run

ArgumentError in 'should not fail, but does'
wrong number of arguments (1 for 0)

Does anyone know why this is happening? Am I doing something wrong? (I am using Ruby 1.9.2 and RSpec 1.3.0). Can somebody please help me fix this problem?

+2  A: 

Wow, weird. I was able to duplicate your problem with Ruby 1.9.2. No idea why it happens, but this lets you have a properly pending spec:

class Foo
end

describe Foo do
  # This fails in Ruby 1.9.2 but works in 1.8.7
  it "is pending"

  # This works in both
  it "is pending" do
    pending
  end
end

rspec 2.0.0 seems to fix the issue with 1.9.2, however.

rspeicher