require false 11 gem cucumber rails training wheels basic imperative step

Require false 11 gem cucumber rails training wheels

This preview shows page 514 - 517 out of 517 pages.

:require => false 11 gem ’cucumber-rails-training-wheels’ # basic imperative step defs 12 gem ’database_cleaner’ # required by Cucumber 13 gem ’autotest-rails’ 14 gem ’factory_girl_rails’ # if using FactoryGirl 15 gem ’metric_fu’ # collect code metrics 16 end (See Section 6.7 for additional gems to support fixtures and AJAX stubbing in your JavaScript tests.) 2. Run bundle , since you’ve changed your Gemfile . Commit the changes to Gemfile and Gemfile.lock . 3. If all is well, create the subdirectories and files used by RSpec, Cucumber, Jasmine, and if you’re using them, the basic Cucumber imperative steps: 1 rails generate rspec:install
Image of page 514
2 rails generate cucumber:install 3 rails generate cucumber_rails_training_wheels:install 4 rails generate jasmine_rails:install 4. If you’re using SimpleCov, which we recommend, place the following lines at the top of spec/spec_helper.rb to enable it: 1 # at TOP of spec/spec_helper.rb: 2 require ’simplecov’ 3 SimpleCov.start 5. If you’re using FactoryGirl to manage factories (§ 8.5 ), add its setup code: 1 # For RSpec, create this file as spec/support/factory_girl.rb 2 RSpec.configure do |config| 3 config.include FactoryGirl::Syntax::Methods 4 end 1 # For Cucumber, add at the end of features/support/env.rb: 2 World(FactoryGirl::Syntax::Methods) 6. git add and then commit any files created or modified by these steps. 7. Ensure Heroku deployment still works: git push heroku master You’re now ready to create and apply the first migration (§ 4.2 ), then re-deploy to Heroku and apply the migration in production ( heroku run rake db:migrate ). Add other useful Gems : Some that we recommend include: railroady draws diagrams of your class relationships such as has-many, belongs-to, and so on 5.3 ) omniauth adds portable third-party authentication (§ 5.2 ) devise adds user self-signup pages, and optionally works with omniauth A.10 Fallacies and Pitfalls
Image of page 515
Pitfall: Making check-ins (commits) too large. Git makes it quick and easy to do a commit, so you should do them frequently and make each one small, so that if some commit introduces a problem, you don’t have to also undo all the other changes. For example, if you modified two files to work on feature A and three other files to work on feature B, do two separate commits in case one set of changes needs to be undone later. In fact, advanced Git users use git add to “cherry pick” a subset of changed files to include in a commit: add the specific files you want, and omit the -a flag to git commit . Pitfall: Forgetting to add files to the repo. If you create a new file but forget to add it to the repo, your copy of the code will still work but your file won’t be tracked or backed up. Before you do a commit or a push, use git status to see the list of Untracked Files, and git add any files in that list that should be tracked. You can use the .gitignore file to avoid being warned about files you never want to track, such as binary files or temporary files.
Image of page 516
Image of page 517

You've reached the end of your free preview.

Want to read all 517 pages?

  • Spring '19
  • Dr.Marcos

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors