忘れたときに備えた記録

トップ 最新 追記
2005|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|11|12|
2009|01|02|03|04|05|06|10|12|
2010|06|07|08|12|
2011|07|09|
2012|09|11|
2013|02|03|09|
2015|10|11|
2016|01|08|11|
2017|02|08|10|
2018|11|

2017-10-31(Tuesday)

Asakusa.rbに出てtranspecを教えてもらうの巻

去年の8月9日から時々Asakusa.rbに行っては自作のgemの近代化と称してrspec2から3への書き変えをしていたのですが、今日、transpecと言うものを教えていただいて試したら、一発ですべて終わってしまいました!!??

hiraku@ikradon:~/work/eim_xml$ transpec
Copying the project for dynamic analysis...
Running dynamic analysis with command "bundle exec rspec"...
...............................................................................................................

Deprecation Warnings:

Using `should_receive` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /tmp/d20171031-16790-naisb6/eim_xml/spec/dsl_spec.rb:36:in `block (2 levels) in <module:M>'.

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /tmp/d20171031-16790-naisb6/eim_xml/spec/dsl_spec.rb:21:in `block (2 levels) in <module:M>'.


If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

2 deprecation warnings total

Finished in 0.27722 seconds (files took 0.37989 seconds to load)
111 examples, 0 failures


Gathering the spec suite data...

Converting spec/assertions_test.rb
Converting spec/dsl_spec.rb
Converting spec/eim_xml_spec.rb
Converting spec/formatter_spec.rb
Converting spec/helper_coverage.rb
Converting spec/parser_spec.rb
Converting spec/xhtml_spec.rb

Summary:

391 conversions
  from: obj.should
    to: expect(obj).to
226 conversions
  from: == expected
    to: eq(expected)
22 conversions
  from: =~ /pattern/
    to: match(/pattern/)
13 conversions
  from: obj.should_not
    to: expect(obj).not_to
11 conversions
  from: lambda { }.should
    to: expect { }.to
10 conversions
  from: obj.should_receive(:message)
    to: expect(obj).to receive(:message)

673 conversions, 0 incompletes, 0 warnings, 0 errors

Done! Now run rspec and check if everything is green.

これはすごい