Last active
August 29, 2015 14:00
-
-
Save catm705/11009142 to your computer and use it in GitHub Desktop.
Jasmine Set up in Spec Folder
This file contains hidden or 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
| 1.) Add the gem 'jasmine' to your gemfile like so: | |
| group :development, :test do | |
| gem 'launchy' | |
| gem 'capybara' | |
| gem 'pry-rails' | |
| gem 'selenium-webdriver' | |
| gem 'rspec-rails', '~> 3.0.0.beta' | |
| gem 'jasmine' | |
| # gem 'guard' | |
| # gem 'guard-rspec' | |
| # gem 'guard-bundler', require: false | |
| # gem 'terminal-notifier-guard' | |
| gem 'shoulda-matchers' | |
| gem 'factory_girl_rails' | |
| gem 'rubocop' | |
| gem 'annotate' | |
| gem 'nyan-cat-formatter' | |
| end | |
| Then do: | |
| bundle install | |
| 2.) rails g jasmine:install --> This will create the js spec files. | |
| //jasmine_helper.rb --> This is usually where you run your tests. | |
| rails g jasmine:examples (optional) | |
| rake jasmine ( sorta like running rspec) check on localhost:8888 | |
| i.e. bank_spec.js --> This goes in the 'spec/javascripts' folder | |
| bank.js --> This goes in the app/assets/javascripts folder. | |
| rake jasmine:ci --> 'continuous integration - don't run this one.' | |
| Now put tests into bank_spec.js OR jasmine_helper.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment