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
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
请先登录再写评论。
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.
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
Should work if RSpec support is enabled
Should work, except dynamic be_* matchers (see http://www.jetbrains.net/jira/browse/RUBY-3965)
Should work if RSpec support is enabled
Custom matchers support is in our plans, track issue http://www.jetbrains.net/jira/browse/RUBY-3728