nviennot / rspec-console

Run RSpec tests in your rails console
101 stars 20 forks source link

Support RSpec3 #14

Closed hanachin closed 10 years ago

hanachin commented 10 years ago

My workaround for rspec 3.

Use RSpec::Core::Runner instead of RSpec::Core::CommandLine:

Merge RSpec::Core::CommandLine (never formally declared public) into RSpec::Core::Runner. (Myron Marston)

Use RSpec::Core::World#reset and RSpec::Core::Configuration#reset which currently private api:

Use config.color instead of config.color_enabled:

Remove color_enabled as an alias of color. (Jon Rowe)

nviennot commented 10 years ago

I have a small comment inlined in the diff, otherwise it looks good

undefinedvalue commented 10 years ago

I separately tried to support RSpec 3, but apparently RSpec.configuration= was removed after this pull request was submitted and that breaks how config_cache works.

I've opened an issue with RSpec to see what the new way of resetting is: rspec/rspec-core#1700

nviennot commented 10 years ago

Thanks for figuring this out

ebeigarts commented 10 years ago

This works for me with RSpec 3.1 and Rails 4.1.

nviennot commented 10 years ago

@ebeigarts thanks :)