0
0

More than 1 year has passed since last update.

#rspec の subject の中とか binding.pry とかすると Rspecの内部処理が表示されて動かないのだが? ( #Rails )

Last updated at Posted at 2019-11-07

動かない

なにこれ

subject { binding.pry; some }
From: /usr/local/bundle/gems/rspec-core-3.8.2/lib/rspec/core/memoized_helpers.rb @ line 317 RSpec::ExampleGroups::SomeClass

 => 317: define_method(name) { __memoized.fetch_or_store(name) { super(&nil) } }

[1] pry(#<RSpec::ExampleGroups::SomeClass>)>

動く

ブレースじゃなくて do end で複数行で書くという裏技を教わった

subject do
  binding.pry
  some
end

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0