Last active
December 17, 2015 03:48
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s.add_development_dependency "rspec-rails" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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