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
4.3 (156 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,609 students enrolled
$19
$175
89% off
Take This Course
  • Lectures 103
  • Length 13 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 8/2015 English

Course Description

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!

What are the requirements?

  • 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

What am I going to get from this course?

  • 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

What 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

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction: Up and running with Ruby on Rails 4.2 using cloud based IDE
01:53

Introduction to the course

08:59

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

01:30

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

Article

Update on development environment and free IDE's

03:49

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

14:57

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.

14:12

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

12:13

Optional: Use cloud9 as the IDE intstead of nitrous

13:10

Optional: Use koding as IDE instead of nitrous

Section 2: Testing and Setup
02:58

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

02:28

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

09:53

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

04:52

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.

03:59

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.

Section 3: Build Feature Tests - BDD
04:43

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

19:55

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

18:01

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

16:15

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

Article

Code for the new template

09:29

Complete the create action necessary to handle new article submissions.

05:05

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

02:26

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

18:09

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

03:52

Discuss the difference between Flash and Flash.now

15:28

Build the listing articles feature for the web app.

13:28

Build the showing articles feature for the web app.

10:56

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

13:31

Build the editing articles feature for the web app.

10:40

Build the deleting articles feature for the web app.

09:45

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

Section 4: User Management
01:38

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

03:30

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

11:22

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

11:50

Learn how to install and update Devise views.

01:14

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

08:26

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

17:51

Customize views and learn how to create partials

08:20

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

14:45

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

07:02

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.

14:44

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

15:44

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

Section 5: Comments feature - nested routes
19:10

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

Article

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

13:37

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

03:05

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

Section 6: Workout App - User Management
02:44

Introduction to the workout app and preview the completed app

01:31

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

05:53

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

Article

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

Article

Solution to creating homepage feature spec.

Article

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

Article

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

14:56

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

Article

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

03:48

Add devise to the application for user management.

00:55

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

Article

Solution for the user signup feature spec.

07:14

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

01:08

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

Article

Solution for user sign in feature spec.

05:51

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

Article

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

Article

Solution for user sign out feature spec.

03:06

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

03:43

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

Article

Document templates for the sign up and new views.

07:07

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

Article

Code for devise_error_messages! method

04:18

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

04:08

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

Section 7: Exercise Management
09:21

Introduction to exercises and build valid exercise feature spec.

09:03

Build routes for exercises and exercises controller.

05:31

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

14:18

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

Article

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

08:53

Build the show action.

Article

Text document containing code used in show.html.erb

07:56

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

06:31

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

17:21

Build the listing workouts feature for the application.

17:39

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

Article

Text document with code used in the exercise.js file

17:52

Implement the editing workouts feature of the application.

11:26

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

Section 8: Working with Users
03:40

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

08:31

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

10:56

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

04:26

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

09:25

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

19:38

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

Article

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

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Mashrur Hossain, 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.

Instructor Biography

Emmanuel Asante, 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.

Ready to start learning?
Take This Course