rspec auto-complete fails

Rspec contains the following problems:

1) be_* not autocomplete, example:
  1.should be_<no auto-complete>

  
Referring to the example below should work. Currently it is supported by NetBeans IDE.

config/initializes/custom_matchers.rb
def be_range(value1, value2)
  CustomMatchers::BeRange.new(value1, value2)
end

1.should be_range(1, 3) work auto-complete

2) "it" expression "is cannot find"

3) be_true, be_false, etc expressions "is cannot find"


4) describe expression "is cannot find"

5) other example can'not work auto-complete

This other example does not work:

spec/spec_helper

Spec::Runner.configure do |config|
    config.extend(FixturesHelper)
  config.include(ModelsHelper)
end

module FixturesHelper
  def fixtures_customer
    fixtures :customer, products, etc, etc
  end
end

describe "..." do
  fixtures_customer #not work auto-complete
end

module ModelsHelper
  def find_stock
   #...
  end
end

describe "..." do
  it "..." do
    find_stock <auto complete not work>
  end

end



Regards


Alexandre Riveira


1 comment
Comment actions Permalink

I think RSpec support isn't enabled in your project. Let's check

1. Open RM's Gem Manager (RM | File | Settings | Ruby SDK and Gems) and check that "rspec", "rspec-rails" gems are attached to the project
2. Also check that RM can understand that your file requires 'spec' directly or indirectly. E.g your rspec test requires "spec_helper.rb" file which requires "spec" script, and etc.

1) be_* not autocomplete, example:

  1.should be_<no auto-complete>

Be_* matchers (except dynamic matchers) should work. E.g.
foo be_nil
will work and
foo be_someting_dynamic
where something_dynamic? is method of foo's return value - wont work

2) "it" expression "is cannot find"



 

Should work if RSpec support is enabled

3) be_true, be_false, etc expressions "is cannot find"



 

Should work, except dynamic be_* matchers (see http://www.jetbrains.net/jira/browse/RUBY-3965)

4) describe expression "is cannot find"



 

Should work if RSpec support is enabled

5) other example can'not work auto-complete
...
describe "..." do
  fixtures_customer #not work auto-complete
end
..

    find_stock <auto complete not work>
...



 


Custom matchers support is in our plans, track issue http://www.jetbrains.net/jira/browse/RUBY-3728

0

Please sign in to leave a comment.