i have rspec test code this
describe 'utils' puts 1111 describe '#time_condition' puts 2221 puts 'aaa' end puts 2223 end end
my launch.json this
{ "name": "rspec - all", "type": "ruby", "request": "launch", "cwd": "${workspaceroot}", "program": "${workspaceroot}/spec/*_rspec.rb", "args": [ "--pattern", "*_rspec.rb" ] },
when run test on vscode, got
1111 2221 2223
when run test command, got
>rspec spec --pattern *_rspec.rb 1111 2221 2223 aaa . finished in 0.003 seconds (files took 0.23602 seconds load) 1 example, 0 failures
as can see, no 'aaa' output, means no 'it' executed. so...how can make 'it' run on vscode?
by way, spec config files (generated rspec --init)like
.rspec
--color --require spec_helper
spec\spec_helper.rb
rspec.configure |config| config.expect_with :rspec |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec |mocks| mocks.verify_partial_doubles = true end config.profile_examples = 10 config.order = :random kernel.srand config.seed end
vscode : 1.4.0
ruby extensions : 0.5.3
thanks
ok. solved it! fault setting wrong value program. program must rspec path.
... { "name": "rspec - all", "type": "ruby", "request": "launch", "cwd": "${workspaceroot}", "program": "d:/ruby/ruby21/bin/rspec", "args": [ "--pattern", "${workspaceroot}/spec/**/*_rspec.rb" ] }, ...
Comments
Post a Comment