BDD with Ruby on Rails using RSpec 3 and Capybara
4.6 (188 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,764 students enrolled
Wishlisted Wishlist

Please confirm that you want to add BDD with Ruby on Rails using RSpec 3 and Capybara to your Wishlist.

Add to Wishlist

BDD with Ruby on Rails using RSpec 3 and Capybara

Use Behavior Driven Development to build feature rich Ruby on Rails web apps using Rails 4.2, Rspec 3 and Capybara
Best Seller
4.6 (188 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,764 students enrolled
Last updated 3/2017
Price: $175
30-Day Money-Back Guarantee
  • 12.5 hours on-demand video
  • 20 Articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Build robust web applications using Ruby on Rails complete with test suite
  • Use Behavior Driven Development (BDD) to develop code
  • See web applications from a user perspective and emulate user behavior on the browser
  • Think of the business process goals or functions and then approach building features
View Curriculum
  • Students who are currently enrolled in or have completed the "Professional Ruby on Rails Developer" or have equivalent experience and/or understanding in Rails should take this course
  • A browser and internet connection
  • No prior BDD or testing experience necessary
  • Students with a basic understanding of Rails syntax and MVC structure and have ability to understand basic code

Behavior Driven Development (BDD) with Ruby on Rails using RSpec and Capybara provides a thorough introduction to using BDD to building web applications using the popular Ruby on Rails framework. Why BDD to build web applications? The advantages are numerous, and Feature specs used extensively in BDD read like plain English which allows end users and developers to easily communicate with each other using BDD tools. In addition, it is easy for the end users to write the features themselves.

This course is designed for students who have some Ruby on Rails or web application development experience who want to take their skills to the next level but have no or limited experience in BDD or automated testing.

Why should students currently enrolled in the Professional Ruby on Rails Developer or already with some Rails experience take this course?

- Behavior Driven Development is the focus of this course!

- RSpec and Capybara experience for automated testing is necessary as a rails developer, covered thoroughly in this course!

- Emulating browser based user behavior to complete a business process from beginning to end, covered thoroughly in this course!

- Big resume booster, knowledge and usage of RSpec and automated testing is very important, most of the Rails community uses this!

- Complete coverage in terms of features, ALL features are built on basis of automated testing specs, not just selective features

- Building two complex and functional web apps including the featured workout web app in 1 course!

Tip: Most rails syntax (not complex) will not be explained, therefore students are expected to know basics like naming conventions and .each method etc. However, all features and BDD steps will be explained.

Some other key aspects of this course are:

- 99 lectures!

- Rails 4.2 using cloud-based IDE

- Working with external javascript libraries for charts and date pickers

- Migrations, one-to-many and many-to-many associations

- much, much more!

Who is the target audience?
  • All students currently enrolled in my "Professional Ruby on Rails Developer" course should take this course to expand their web development skillset and learn to build more web apps using Rails
  • Programmers who know Ruby on Rails or other web development framework but want to learn Behavior Driven Development and emulate user behavior
  • Students who are interested in becoming professionals in the Development world and want to learn how to speak to business units in terms of business requirements
  • Students who want to learn using RSpec and Capybara
  • Who should NOT take this course: If you are an absolute beginner to web application development and have no experience with Rails or are not currently enrolled for my Rails course should not take this course
Compare to Other Ruby On Rails Courses
Curriculum For This Course
103 Lectures
Introduction: Up and running with Ruby on Rails 4.2 using cloud based IDE
9 Lectures 01:12:33

Introduction to the course

Preview 01:53

Discuss course structure and the apps built using feature tests in the course, what is covered and helpful tips to use throughout the course.

Course overview and best way to use the course

Discuss difference between lectures 4 and 5 in setting up a development environment using cloud based IDE vs a local development environment

Overview of development environment setup

Update on development environment and free IDE's

IMPORTANT (Don't skip this lecture): Development Environment Update

Set up free online development environment using one of the leading providers of IDE's.

Setup cloud-based integrated development environment using nitrous

If students want to setup their own local development environment and are using Mac's, they may walkthrough the process using this video. Note: the course prefers nitrous IDE due to fast and issue free setup.

Setup local development environment (Mac users only optional)

Get comfortable and customize cloud-based IDE, run rails server and wrap up Section 1

Get familiar with development environment and wrap up Section 1

Optional: Use cloud9 as the IDE intstead of nitrous

Alternative IDE - Sign up and use Cloud9 as the IDE instead of nitrous

Optional: Use koding as IDE instead of nitrous

Alternative IDE - Sign up and use Koding as the IDE instead of nitrous
Testing and Setup
5 Lectures 24:10

Learn about the Model-View-Controller structure of Ruby on Rails web applications.

MVC structure of Rails applications

Discuss the different types of testing used in application development. Learn about RSpec testing framework

Introduction to testing - unit, regression and RSpec

Learn how to start a new Rails application without using the default testing framework that comes built in.

Start a new Blog application without default test unit

Setup an account at Github which is an online code repository and add the SSH key of the IDE to it so code can be pushed to the repo without having to log in every time.

Setup a Github account and add SSH key

Create a repository for the blog app code on Github and push the code from local IDE to the repository to store it and wrap up Section 2.

Create a Github repository for the web app and wrap up Section 2
Build Feature Tests - BDD
16 Lectures 02:52:14

Add RSpec and Capybara to the application so they can be used for feature specs and any other testing needs.

Preview 04:43

Learn how to use git branch feature and use the feature branch to build the create article feature test.

Git branch and create article feature test

Setup Bootstrap for ease of front-end development (UI) and add navigation and messages to the application

Setup Bootstrap, add navigation and messages

Setup ability to add new article through the browser and create route.

New article and route

Code for the new template

New template code - document

Complete the create action necessary to handle new article submissions.

Complete create action

Add Guard to the application so tests will run automatically when changes are made to the code without needing to trigger rspec command.

Add Guard to the application

Learn to use Guard and ensure it runs. Fix a minor bug that was introduced during the setup of Guard.

Preview 02:26

Learn to add validations so restrictions can be enforced on the models, in this case articles.

Add validations for articles

Discuss the difference between Flash and

Flash vs.

Build the listing articles feature for the web app.

Listing articles feature

Build the showing articles feature for the web app.

Showing articles feature

Edit the default setup of guard by manipulating the code in the Guardfile to work the way best fits for building the application.

Update guard for wanted behavior

Build the editing articles feature for the web app.

Editing articles feature

Build the deleting articles feature for the web app.

Deleting articles feature

Refactor the code in the new and edit templates to extract away the redundancy and repetition of code.

Refactor the code
User Management
12 Lectures 01:56:26

Introduction to the User model and how users will be used and implemented in the application.

Introduction to users

Install Devise, which is a popular user management gem, in the application to allow the application to handle users.

Install Devise in the application

Create a model for User and also implement the user signup feature for when users are signing up to use the application.

Create User model and signup feature

Learn how to install and update Devise views.

Update Devise views

Learn how to fix a view after it's created.

Fix view

Build the ability for users to sign-in or log in to the application.

User sign in feature

Customize views and learn how to create partials

Customize Devise views and create partials

Build the ability for users to sign-out of the application

User sign out

Link articles to users to build the first association between the two models.

Build one-to-many association

Look at the app from the UI and ensure everything is working as expected, add some additional styling and learn how to clean up branches that have been merged back to master.

Review app from the UI (browser), add styling and clean up branches

Restrict access to new, edit and delete buttons based on feature requirements.

Restrict access to certain features from UI

Enforce restrictions in the controller for a second layer of protection.

Restrict access in controller
Comments feature - nested routes
4 Lectures 36:48

Build the ability for signed in users to add comments to articles.

Add comments feature

The articles/show.html.erb template document in text format

articles/show.html.erb template

Complete the working implementation of the comments feature for the application.

Complete comments feature

Homework project to deploy the application to production using an online hosting service called Heroku.

Project Homework: Deploy to Production using Heroku
Workout App - User Management
25 Lectures 01:09:56

Introduction to the workout app and preview the completed app

Preview 02:44

Start a new Rails Project named workout_app and ensure it's built without the default mini-test testing framework.

Preview 01:31

Video solution to creating a new workout_app project without mini-test

Preview 05:53

Homework assignment for students to apply what they learnt in the blog app and create the first homepage feature spec for the workout app.

Homework assignment: Create first feature spec

Solution to creating homepage feature spec.

Solution: homepage feature spec

Apply what was learnt in the blog app to add guard to the application

Homework assignment: Add guard to application

Solution for how to add guard to the application to automate the running of tests.

Solution: add guard to the application

Create the application's homepage and add bootstrap to the application for front-end styling.

Create homepage and add Bootstrap to the application

Template for application.html.erb file prior to updates made during the video lecture for creating homepage on lecture 51.

Code template for application.html.erb prior to updates made in lecture 51

Add devise to the application for user management.

Setup Devise

Homework assignment for students to apply their knowledge and create a user signup feature spec.

Homework assignment: Create feature spec for user signup

Solution for the user signup feature spec.

Solution: User signup feature spec

Build the user signup feature of the application so users can signup to use the application.

User signup

Apply the knowledge of feature specs acquired while building the blog app to create a spec for user sign in.

Homework assignment: Create feature spec for user sign in

Solution for user sign in feature spec.

Solution: User sign in feature spec

Build the user sign in feature of the application so users can sign in to use the application.

User sign in

Apply knowledge acquired while building the blog app to create a feature spec for signing users out.

Homework assignment: Create feature spec for user sign out

Solution for user sign out feature spec.

Solution: User sign out feature spec

Build the user sign out feature of the application so users can sign out of the application.

User sign out

Update the signup and new form templates so they look good.

Beautify Devise views

Document templates for the sign up and new views.

Templates for sign up and new views

Override the devise_error_messages! method that comes by default with devise.

Override devise_error_messages! method

Code for devise_error_messages! method

Template for devise_error_messages! method and custom.css.scss styling

Create form partials to clean up the application.html.erb file and group them to header and main.

Create partials - header and main

Restrict access to links in the application based on specs and wrap up section 6.

Restrict links and wrap up Section 6
Exercise Management
14 Lectures 02:07:16

Introduction to exercises and build valid exercise feature spec.

Introduction to section 7 and build feature spec

Build routes for exercises and exercises controller.

Routes and controller for exercises

Build the exercise model and one to many association with user.

Exercise model and association with user

Build ability to create new exercises, update the user model and create the _form.html.erb partial

Build new exercise, update user model and add form partial

Text document containing code used in the form partial (_form.html.erb)

Template for _form.html.erb partial

Build the show action.

Show action and template

Text document containing code used in show.html.erb

Template for show.html.erb

Create invalid exercise feature test and use it to build the validations used for the exercise model.

Validations: Invalid exercise feature test and implementation

Add datepicker to the application so users can select workout dates from a pretty user interface.

Add datepicker

Build the listing workouts feature for the application.

Listing workouts

Adding graphs to exercises listing page for users by using the morris.js and raphael.js javascript libraries.

Adding graphs to exercise listing and default scope

Text document with code used in the exercise.js file

Code for exercise.js file

Implement the editing workouts feature of the application.

Edit workouts

Implement the delete workouts feature, cleanup specs and wrap up Section 7.

Delete workouts and wrap up Section 7
Working with Users
8 Lectures 01:04:44

Introduction to the users listings section and fix a bug associated with flash message displays.

Introduction to Section 8 and fix flash messages bug

Implement feature where all users who are using the app are displayed on the homepage.

Add users listings to homepage

Add first name and last name to users, till this point they were identified by email address only.

Add usernames to users

Enforce additional validations for the user model, namely user names.

Add validations for names

Add pagination to the application to beautify and organize user listing views. Only 10 users displayed per page.

Add pagination to users listings

Implement the search user by username feature so users can search other users registered for and using the application.

Search users

Code for method newly created in the application during the search implementation.

Code for self.search_by_name method

Some feature specs required addition of first_name and last_name in order to work correctly, fix those specs and wrap up section 8.

Wrap up section 8 and clean up broken specs due to name validations
Follow/Unfollow Friends
9 Lectures 01:14:28

Introduction to friendships and how follow/unfollow will be created between users. Create follow friend feature spec.

Introduction and follow friend feature spec

Build the many to many association between users and friends using the friendships table and rails has_many :through association.

Many to many association between users and friends through friendships

Build the controller and routes for friendships necessary to implement to the follow/unfollow feature.

Create controller and routes for friendships

Build a listing of friends who are being followed by users.

Display friends

Build the show feature of friendships where users can view the workout details of friends they follow.

Show friend's workout details

Code used in the showing friend workout details spec.

Showing friend workout details feature spec document

Implement the unfollow a friend feature where a user can choose to no longer follow a friend they were previously following.

Unfollow a friend

Make final change to app after review through UI and assign final homework assignment.

Review, final updates, app wrap up and homework assignment

Thank you for taking the course and next steps.

Thank you for taking the course
Misc - Items and links useful for course
1 Lecture 00:00

Github repos for the blog app and workout app built during the course

Github repository links for the apps built in the course
About the Instructor
Mashrur Hossain
4.4 Average rating
7,079 Reviews
62,672 Students
11 Courses
Technology Professional and Entrepreneur

Hi, I'm Mashrur, I have been a technology professional for over a decade and have degrees in Computer Science and Economics

I have worked with Enterprise Software Systems throughout my career with roles played in analysis, development and management. I lead projects using both agile and waterfall methodologies and am well versed in the inner workings of the software development and delivery world.

During my career, I've realized how much I enjoyed training new hires and new team members and helping them succeed. I've dedicated a good amount of time over the last 7 years on-boarding new analysts and developers and working with them to build and maintain systems which puts me in a very unique position of knowing what new entrants to a field or subject need to succeed. I strongly believe in a focus on fundamentals and practice and not in shortcuts or gimmicks.

I'm very passionate about web application development and I prototype and build web apps in entrepreneurial pursuits. Ruby on Rails has proven to be a very strong force in this field and is especially powerful for startups looking to prototype ideas rapidly and subsequently building on that platform as the ideas catch on.

So join me for my comprehensive Ruby on Rails Developer courses as I guide you through the world of web application development using Rails and bringing your ideas to life.

Emmanuel Asante
4.2 Average rating
469 Reviews
5,118 Students
4 Courses
Mining Software Developer and Freelancer

I studied mining engineering and information systems. I completed a Diploma in Datametrics at the University of South Africa with a specialization in Information Systems.

Whilst working in the mines, I developed various mining, rock mechanics and geological applications using languages ranging from Perl, Turbo Pascal to C#, Java and Ruby. In particular, I developed a mining production information management system, as well as a pit crew performance management system, both for Thompson Creek Metals (Endako Mines), and a client management application for Snowden Mining Industry Consultants, using Ruby on Rails. I currently do freelance web development in Ruby on Rails.