Skip to content

Instantly share code, notes, and snippets.

@johnnaegle
Last active December 17, 2015 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnnaegle/5545345 to your computer and use it in GitHub Desktop.
Save johnnaegle/5545345 to your computer and use it in GitHub Desktop.
Convert from using test-unit to rspec for a dummy application in a gem
s.add_development_dependency "rspec-rails"
~/projects/scratch> bundle install
Using rspec-core (2.12.2)
Using rspec-expectations (2.12.1)
Using rspec-mocks (2.12.1)
Using rspec-rails (2.12.0)
Using scratch (0.0.1) from source at .
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
~/projects/scratch> rspec --init
create spec/spec_helper.rb
create .rspec
~/projects/scratch> mv test/dummy spec/
~/projects/scratch> rm -rf test
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help"
require '<gemname>'
Rails.backtrace_cleaner.remove_silencers!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment